I have the following network path to copy the file to an archive folder. It copies File 1
from Folder
to Archive
but I would like to add these 2 adjustments that won't work.
File 1-1
to File 1 - date + time
For my code I followed this example to change the name to a date.
copy "F:\Folder\File 1.xlsx" "F:\Folder\Archive\File 1-1.xlsx"
/f "tokens=1-5 delim s=/ " %%d in ("%date%") do rename "F:\Folder example 2.xlsx" "F:\Folder\File example %%e-%%f-%%g.xlsx"
You can press and hold the Ctrl key and then click each file to rename. Or you can choose the first file, press and hold the Shift key, and then click the last file to select a group.
try this:
ren "File 1-1" "File 1 - %date:/=-% %time::=-%"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With