:: check first the
previous post for Getting A Nice Time in windows cmd
@ECHO OFF
:: ============== FILE BackUpCurrentDirFiles.cmd START =========================================================
ECHO BackUpCurrentDirFiles.cmd -- makes timestamped versions of each files in the current directory
ECHO AND PLACES THEM INTO THE BACKUPS DIRECTORY
ECHO CREATE THE BACKUPS FOLDER IF IT DOES NOT EXIST
mkdir backups
SET NICETIME=BOO
CALL GetNiceTime.cmd
:: DEBUG PAUSE
ECHO NICETIME IS %NICETIME%
:: DEBUG PAUSE
echo nice time is %NICETIME%
::for /f "tokens=1,2 delims=." %%i in ('dir /b') do ECHO %%i.%%j
ECHO FIRST COPY THE FILES INTO THE BACKUPS FOLDER
for /f "tokens=1,2 delims=." %%i in ('dir /b /A-D') do copy "%%i.%%j" "%CD%\backups\"
:: DEBUG PAUSE
for /f "tokens=1,2 delims=." %%i in ('dir /b /A-D') do RENAME "%CD%\backups\%%i.%%j" "%%i%NICETIME%.%%j"
:: DEBUG PAUSE
:: ============== FILE BackUpCurrentDirFiles.cmd END =========================================================
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!