Copy File then rename the copied file with date and time using dos command
C:\FileName.bak Z:\ /C /Y ren Z:\FileName.bak FileName.bak%date:~4,2%-%date:~7,2%-%date:~10,4%-%time:~1,1%%time:~3,2%%time:~6,2%
I discovered that when the folder name is with spaces. just put a double qoute.
XCOPY C:\FileName.bak Y:\"Folder Name"\"Sub Folder"\ /C /Y
ren Y:\"Folder Name"\"Sub Folder"\ Filename.bak FileName.bak%date:~4,2%%date:~7,2%%date:~10,4%-%time:~1,1%%time:~3,2%%time:~6,2%
C:\FileName.bak Z:\ /C /Y ren Z:\FileName.bak FileName.bak%date:~4,2%-%date:~7,2%-%date:~10,4%-%time:~1,1%%time:~3,2%%time:~6,2%
I discovered that when the folder name is with spaces. just put a double qoute.
XCOPY C:\FileName.bak Y:\"Folder Name"\"Sub Folder"\ /C /Y
ren Y:\"Folder Name"\"Sub Folder"\ Filename.bak FileName.bak%date:~4,2%%date:~7,2%%date:~10,4%-%time:~1,1%%time:~3,2%%time:~6,2%
Comments
Post a Comment