Hello foxidrive
I applied the parser to convert date format ddmmyyyy to yyyymmdd and it worked.
The sort command worked perfectlly.
See you
Finding newest file in all subdirectories
Moderator: DosItHelp
-
- Posts: 21
- Joined: 19 Jul 2013 11:35
- Location: Brazil
Re: Finding newest file in all subdirectories
Glad to be of help. Cheers.
Re: Finding newest file in all subdirectories
Please explain this portion of the last line of code: set "%1=%rtn:~18%"
I want to modify the block of code in the above post to only bring back the newest date and not worry about the filename.
I am in process of simplifying the for loop to only utilize the date parameters A, B, C and not worry about the time or the path/filename.
For completeness of understanding, I'd like to know what the above code specifically accomplishes (set "%1=%rtn:~18%").
Thank you.
I want to modify the block of code in the above post to only bring back the newest date and not worry about the filename.
I am in process of simplifying the for loop to only utilize the date parameters A, B, C and not worry about the time or the path/filename.
For completeness of understanding, I'd like to know what the above code specifically accomplishes (set "%1=%rtn:~18%").
Thank you.
Re: Finding newest file in all subdirectories
%1 is the first parameter passed to the batch file when it was called. Execute CALL /? to learn more.
%rtn:~18% is the substring of the value in %rtn% beginning after the 18th character till the end. Execute SET /? to learn more.
Steffen
%rtn:~18% is the substring of the value in %rtn% beginning after the 18th character till the end. Execute SET /? to learn more.
Steffen