file path with changing folder name
Posted: 28 Apr 2020 11:42
Hello everyone,
I am trying to create a batch file that will essentially look into a specific folder to check for missing files. However, the folder changes everyday and a new folder is created everyday with previous business day (t-1) as the folder name. Hence, I am trying to create a dynamic batch script which will select the folder with the latest date as its folder name. Here is an example of what the path to the folder would look like:
C:\Users\UserA\Ad_Hoc\27Feb2020\Folder_A\File_A
The folder name in bold is what would change everyday and everything else stays consistent. Is there a way to make the path dynamic in terms of the changing folder name?
Thanks!
I am trying to create a batch file that will essentially look into a specific folder to check for missing files. However, the folder changes everyday and a new folder is created everyday with previous business day (t-1) as the folder name. Hence, I am trying to create a dynamic batch script which will select the folder with the latest date as its folder name. Here is an example of what the path to the folder would look like:
C:\Users\UserA\Ad_Hoc\27Feb2020\Folder_A\File_A
The folder name in bold is what would change everyday and everything else stays consistent. Is there a way to make the path dynamic in terms of the changing folder name?
Thanks!