Luis Diaz
asked on
Powershell/Windows Batch/VB Script: rename files with folder name
Hello experts,
I am looking for a batch, powershell or vbscript to cover the following requirement:
Loop a reported folder (no drill down needed):
-Rename the various files with reported folder name and add a numbering based on modified date from oldest to newest
-Example:
BaseDir= “C:\toto” contains filea.csv filea.xls fileb.csv
Expected result is the following:
toto-1.csv, toto-2.xls, toto-3.csv
If you have questions, please contact me.
Thank you.
I am looking for a batch, powershell or vbscript to cover the following requirement:
Loop a reported folder (no drill down needed):
-Rename the various files with reported folder name and add a numbering based on modified date from oldest to newest
-Example:
BaseDir= “C:\toto” contains filea.csv filea.xls fileb.csv
Expected result is the following:
toto-1.csv, toto-2.xls, toto-3.csv
If you have questions, please contact me.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tested and it works!
Thank you again for your help.
Thank you again for your help.
Open in new window
Edit: Fixed issue with lost extension.