Dolphin service menu help: preserve file timestamp

Kevin Krammer kevin.krammer at gmx.at
Fri Dec 17 15:42:41 GMT 2010


On Friday, 2010-12-17, Dotan Cohen wrote:
> Hi all, I have a Dolphin service menu that converts from CP1255 to UTF-8:
> Exec=iconv -f CP1255 -t UTF-8 %u > %f-utf8
> 
> However, it is important to me that the file's timestamp not be
> altered. How would I go about doing this? Would I need to write a bash
> script then call that from the Exec line, instead of doing it all in
> the .desktop file itself?

Well, since you are modifying the file it is natural that this updates the 
modification timestamp.

What you could try to do is to get the current timestamp before modification 
and then restore it using touch.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20101217/b39b4cff/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list