7 replies
by hardeec
by rbmrf
makedir c:\backupdir\%date%
this will create a directory with the current date
the rest i think is easy move c:\* c:\backupdir\%date%
i use this for running backups at nigth, and my directories are with the date of the day that the script runs
by hardeec
by tonythetiger
(Between the '===' is all on one line)
===
for /f "tokens=1-4 delims=/ " %%i in ('date /t') do set todaydir=%%l%%j%%k
===
then change to the destination drive and
md %todaydir%
look at help for date options for XCOPY. Move does not have a date function, but Xcopy does, you can then delete the files you just xcopied by going to the destination drive and directory and
for %%f in (*.*) do del [source directory]\%%f
by hardeec
bless you. It works! Where is this type of batch programing listed on microsoft's site? I am going to close the question so just send me a private message.
by hardeec
by mahesh2506
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending