Is there a way to set the created date to a fixed (user selected) date value for all files within a folder tree structure?
I've looked in the forum but most questions relate to either exif, or setting to current date.
I'm working on a website where some of the files from a product vendor have no date data or else 1/1/1980 in the created data field.
I wish to be able to change that to the date of the version release, so I know better what is what.
I would want thus to be able to set all files and folders within a folder to have the same created date.
I did not see such in the set files special on my Pro installed version (only the exif). And as I say, I don't want to ''nix style touch' them to have today's date, I need to set them all to a date in the past.
Thank you.
How to set Created date to fixed value for all files within a folder tree
-
TechHarmony
- Posts: 4
- Joined: 06 Jan 2012 04:38
- Location: California, USA
How to set Created date to fixed value for all files within a folder tree
the Universe is intelligent and friendly 
-
chincherpa
- Posts: 37
- Joined: 13 Dec 2016 10:58
- Location: Stuttgart, Germany
Re: How to set Created date to fixed value for all files within a folder tree
Hi,
that would be my solution (sets DateCreated of all selected files to "2016-12-06 12:30:00"):
"extracted" from here: viewtopic.php?f=7&t=10966
that would be my solution (sets DateCreated of all selected files to "2016-12-06 12:30:00"):
Code: Select all
// Get the current selection.
$sel = Get('SelectedItemsPathNames');
// For each item in the selection...
foreach($item, $sel, "<crlf>") {
timestamp 'c', "2016-12-06 12:30:00", $item;
}-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to set Created date to fixed value for all files within a folder tree
No need to do this case with a foreach loop (because all files + folders should be set to the same date and no date needs to "extracted" e.g. from a file name)
The datepicker() let's you select a date (default = today) and quicksearch delivers the necessary files + folders without the need to select
them first in the current directory. Be careful, It's modifying everything recursively from within the current path and down.
If you don't want this, change it like this:
Code: Select all
timestamp "c", datepicker(), quicksearch(, , "|");them first in the current directory. Be careful, It's modifying everything recursively from within the current path and down.
If you don't want this, change it like this:
Code: Select all
timestamp "c", datepicker(), quicksearch("/n", , "|");One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club