Hi there
The purpose of this post is to check how this problem/requirement is best solved.
I think it could be scripted but my scripting skills are limited really to analysing and editing existing scripts...
Would it be feasible to script a solution for this?
Many thanks as always for any responses....
This link shows a video of what I do by hand very very often and it would be great if I could somehow reduce this to clicking a button.....
Draft Spec:
C1 Consider a list of files with a date-time prefix and an optional text suffix with any extension.
This would be of the following filename format:
YYYY-MM-DD HHhMMmSS.ext
or
YYYY-MM-DD HHhMMmSS SUFFIX TEXT.ext
For example this list of files below:
2019-01-18 12h03m26
2019-01-18 11h27m15
2019-01-18 11h25m45
2019-01-18 11h14m44 North Rd duplex print
2019-01-18 11h14m12
2019-01-18 11h00m53
2019-01-18 10h50m03 SD-WAN SandPit Booking3
2019-01-18 01h13m38
2019-01-17 21h46m23
2019-01-17 21h40m53
2019-01-17 21h37m11
2019-01-17 21h35m44
2019-01-17 20h00m00
N.B. the list above shows the filename stems only. The extensions are missing.
C2 Call this the SELECTED FILES.
C3 Consider that the folder is sorted using Filename (Folder Options > Columns tab > Filename field checked).
C4 Consider that the Reverse sort order option is enabled (Folder Options > Display tab > Reverse sort order field checked)
C5 Considerations C3 and C4 have the effect of sorting the filenames in chronological order most recent at the top. See file list above for example.
C6 Consider the file list to be selected. i.e. All files in the list are highlighted.
The above considerations describe the conditions under which the desired script should be executed.
Below is described the actions which the script should execute:
A1 A popup should appear prompting for text. Call this the FOLDER SUFFIX TEXT.
A2 The file at the bottom of the list above is the file with the oldest date/time stamp.
In the example above this file name stem is:
2019-01-17 20h00m00
Call this the OLDEST FILENAME
A folder should be created in the current directory with the following name:
<OLDEST FILENAME> <FOLDER SUFFIX TEXT>
There is a single space between the 2 parameters above.
If the FOLDER SUFFIX TEXT is blank then the folder name should be <OLDEST FILENAME>
.
A3 All the SELECTED FILES should be moved to the newly created folder
A4 All SELECTED FILES should now be in a folder in the current directory named
2019-01-17 20h00m00 Blah
Where blah is the FOLDER SUFFIX TEXT entered in A1 above (if any)
A5 Script should end.