Can someone make a script for this?
when you got a folder: that contains files from diffrend dates.
then when click the button the script would set each file to a new created map called like the date of the file.
so they are sorted in folders
i have no idea about scripting but if someone can it would be great.
[Title modified]
Move files into subfolders
Re: Request
Just to the concept: you want to name the folders like dd-mm-yyyy
Wouldn't it be better, just for sorting, to name them yyyy-mm-dd
I even create main folders yyyy, with subfolders mm-dd - but that seems to be a matter of taste.
By the way: I think it would be better to take the date from "Picture Taken" than from Created. As "Created" can be modified, e.g. for on operations.
Wouldn't it be better, just for sorting, to name them yyyy-mm-dd
I even create main folders yyyy, with subfolders mm-dd - but that seems to be a matter of taste.
By the way: I think it would be better to take the date from "Picture Taken" than from Created. As "Created" can be modified, e.g. for on operations.
Win11 Pro 223H2 Gerrman
Re: Request
Code: Select all
foreach($file, listpane(, , 1)) {
moveto regexreplace(regexmatches(property("#date.c", $file), "^[^\s]+"), "\/\\", "-"), $file, , 2;
}
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 11
- Joined: 01 Jul 2014 15:07
Re: Request
Uhm Yeah yyyy-mm-dd is actually better thnx:)
And "Picture taken" is also great:) i have no idea what the options are thats why i ask it to smart guys in this language:P
But i really dont like to sort it manually. And if its possible i wanted to say really thnx:P
And "Picture taken" is also great:) i have no idea what the options are thats why i ask it to smart guys in this language:P
But i really dont like to sort it manually. And if its possible i wanted to say really thnx:P
-
- Posts: 11
- Joined: 01 Jul 2014 15:07
Re: Move files into subfolders
indeed The begin works great but when i make a test map and copy some files to the folder it get all the same date so they putted in the same folder.
but when i look by "modified" i see diffrends dates. so i think your idea is a lot better:)
but when i look by "modified" i see diffrends dates. so i think your idea is a lot better:)
Re: Move files into subfolders
I assume that you want at least fall back to the created date if there isn't any exif date?
If that's the case, this should work...
It's only valid for date formats like
day.month.year
day-month-year
day/month/year
If that's the case, this should work...
It's only valid for date formats like
day.month.year
day-month-year
day/month/year
Code: Select all
foreach($file, listpane(, , 1)) {
// Exif date (pictures)
if regexmatches(getpathcomponent($file, "ext"), "jpg|jpeg|tiff") {
$date = property("#image.datetaken", $file);
}
if (!$date) {
// Switch to creation date if exif date not found
$date = property("#date.c", $file);
}
// Change date to yyyy-mm-dd
$date = regexreplace($date, "^(\d+)(?:\.|-|/)(\d+)(?:\.|-|/)(\d+)(.*)", "$3-$2-$1");
moveto $date, $file, , 2;
}
One of my scripts helped you out? Please donate via Paypal