|
Answer» Hey, i have CREATED a batch file which copy the data of one folder into another. But after copying i want to give the particular date as a folder name. I am not able to. Please give your suggestions.
This is my code.
echo off
:: variables
echo Backing up file
set /P source=Enter source folder:
set /P destination=Enter Destination folder:
set listfile=xcopy /L
set xcopy=xcopy /S/E/V/Q/F/H
%listfile% %source% %destination%
echo files will be copy press enter to proceed
pause
%xcopy% %source% %destination% %date%
pauseMultipost: http://stackoverflow.com/questions/27012028/create-a-batch-file-with-date-as-folder-name
Does it MATTER to anyone that PEOPLE multipost their questions?
i wanted my ans. this the reason why i have POSTED over here also. sorryThe DATE /T command and the %DATE% variable all output with slashes. So you will need to USE a FOR /F command to strip out the day of the week and the slashes depending on what your DATE format is.
You would then use the MD command to create a new directory for the destination.
|