• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

winRAR experts - how do I do this?

slicksilver

Golden Member
I want to rar a folder multiple times in a day but cant figure out a way on how to name it.

Say I want to backup a folder X. I want the rar file to be named something like "X MM DD YY.rar". How do I do this? I do not want to manually enter the name and date everytime I rar it. Is it possible? I assume this has to do something with scripting and strings. I have no idea of either.

Thanks
 
windows has a scheduler.

i wrote this like 5 years ago and used someones date script for the filename: (uses winzip)

echo Checking to see if External drive is plugged in
echo off
if EXIST f:\backupdrive.txt (
"C:\program files\winzip\wzzip" -e0rp f:\backup.zip e:\backup2 e:\backup.zip
f:
c:\datetype.bat backup.zip
) ELSE ( echo NO EXTERNAL DRIVE PRESENT ABORTNG )


C:\>more datetype.bat
@Echo OFF
TITLE DateName
REM DateName.CMD
REM takes a filename as %1 and renames as %1_YYMMDDHHMM
REM
REM -------------------------------------------------------------
IF %1.==. GoTo USAGE
Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP

DATE /T > %CURRDATE%
TIME /T > %CURRTIME%

Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j

Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k

Echo RENAME %1 %1_%YYYYMMDD%%HHMM%
RENAME %1 %1_%YYYYMMDD%%HHMM%
GoTo END

:USAGE
Echo Usage: DateName filename
Echo Renames filename to filename_YYYYMMDDHHMM
GoTo END

:END
REM
TITLE Command Prompt
 
Back
Top