Saved Bookmarks
| 1. |
Solve : Assign most recent file to a variable. (curious)? |
|
Answer» Hi all,
Cheers, Cameron.show samples of your file formats, and what you WANT to doHi ghostdog74 ... I'd provided the file format in the initial post... %xDIR%\%xMCode%%xCCode%%xTType%.%Year:~2,2%%Month%%Day%.* For example: C:\...\USCBTT.080604.155015 What I WANTED to do was INDICATED in the dot points. you can use the dir command to generate a file listing these switches would seem relevant /b ... generate a bare listing /o:d ... in date order, earliest first /o:-d ... in date order, latest first /T:C ... use file creation date /T:A ... use last access date /T:W ... last written You can add a wildcard to select the file(s) you require e.g. dir /b /o:-d /t:c [filespec] You can use FOR to process the output. You can use the IF EXIST test. |
|