Sometimes, I want to modify timestamps on files.
The functionality to do it in the properties tab of the info panel is useful but it would be rather lovely if (a) a date picker dialog was available, (b) it was possible to sync Created and Modified stamps to save setting them separately and (c) if the tick could be actioned with some sort of keyboard action rather than having to reach for the mouse (I grant that's less of an issue if option a existed!)
(I have a folder of podcasts that I try to listen to chronologically, but if I don't download them on the day they were made I have to set the file's timestamp to match the rss feed to ensure they stay in the "right" order. You're going to tell me I should try to write a script to do it, aren't you? )
Attribute setting
Attribute setting
-- bests, Tim
...This space unintentionally left blank.
...This space unintentionally left blank.
Re: Attribute setting
Write a script^^
You want to do something in a batch anyway, so...
You want to do something in a batch anyway, so...
One of my scripts helped you out? Please donate via Paypal
Re: Attribute setting
Not a batch. Only ever one file at a time. (I might download six podcasts in a session but their date/timestamps will potentially all be different.)highend wrote:Write a script^^
You want to do something in a batch anyway, so...
I knew someone would suggest I write something.
I have thus far failed to acquire any scripting skills in XYplorer, despite having decided a couple of years ago that I needed to. Maybe this is a good reason to try to do something. However, oblivion <>
-- bests, Tim
...This space unintentionally left blank.
...This space unintentionally left blank.
Re: Attribute setting
If you need help, feel free to ask
One of my scripts helped you out? Please donate via Paypal
Re: Attribute setting
Thanks! I'll try not to make you regret that offerhighend wrote:If you need help, feel free to ask
-- bests, Tim
...This space unintentionally left blank.
...This space unintentionally left blank.
Re: Attribute setting
I said: feel free to ask, not: expect an answer
One of my scripts helped you out? Please donate via Paypal
Re: Attribute setting
For example...
This one displays a date picker and after choosing one it sets
the created + last modified date of the current file to that date
and the current time...
The ($date) check is necessary to not do anything when you cancel
the date picker dialog window
This one displays a date picker and after choosing one it sets
the created + last modified date of the current file to that date
and the current time...
The ($date) check is necessary to not do anything when you cancel
the date picker dialog window
Code: Select all
$date = datepicker();
if ($date) {
$date = $date . " " . now("hh:nn:ss");
timestamp "cm", $date, "<curitem>";
}
One of my scripts helped you out? Please donate via Paypal
Re: Attribute setting
I'm in awe.highend wrote:For example...
This one displays a date picker and after choosing one it sets
the created + last modified date of the current file to that date
and the current time...
That's IT?
I expected to have to write a LOT of code.
I have a lot to learn. I think I need to understand a lot better what's available to me and how to apply that to a problem.
Thanks for giving me a push in the right direction!
-- bests, Tim
...This space unintentionally left blank.
...This space unintentionally left blank.
Re: Attribute setting
I sort of get that this is getting more and more offtopic but just in case it's useful to anyone:
And particularly to say "thanks" to highend for the example without which I'm quite sure I wouldn't have known where to even start...
I wanted to have the starting point for the new datestamp for the file to be its original setting. I also wanted a timestamp that was tidier than the current time, but I don't think I want to make it specifically editable. So my version of it looks like this:
Thanks, highend!
And particularly to say "thanks" to highend for the example without which I'm quite sure I wouldn't have known where to even start...
I wanted to have the starting point for the new datestamp for the file to be its original setting. I also wanted a timestamp that was tidier than the current time, but I don't think I want to make it specifically editable. So my version of it looks like this:
Code: Select all
$date = datepicker(<datem dd-mm-yyyy>);
if ($date) {
$date = $date . " " . 01:00:00;
timestamp "cm", $date, "<curitem>";
}
-- bests, Tim
...This space unintentionally left blank.
...This space unintentionally left blank.