Copy everything below this line into a file called "WinRAR Files.tsk" and import into RoboTask.
;********************
; RoboTask Task file
; Do not edit!
;********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|802282160
ExternalName=STRING|"Task5"
Hide=INTEGER|0
ID=INTEGER|57978430
Name=STRING|"WinRAR Files"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action13=FOLDER
Action14=FOLDER
Action15=FOLDER
Action16=FOLDER
Action17=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER
[Actions\Action1]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""RoboTask - WinRAR Files"""
Params=FOLDER
[Actions\Action1\Params]
icon=STRING|"1"
msg0=STRING|"RoboTask - WinRAR Files"
msg11=STRING|"Switches:"
msg12=STRING|"-cfg- = ignore default profile and environment variable"
msg13=STRING|"-m5 = set compression method. 5 is Best compression method (most compressive but also most slow)"
msg14=STRING|"-r = recurse subfolders"
msg15=STRING|"-ibck = run WinRAR in background"
msg16=STRING|"-ed = do not add empty folders"
msg17=STRING|"-hpMyPassword = encrypt both file data and headers with password ""MyPassword"""
msg18=STRING|"-x@EXCLUDELISTFILE = exclude files using a specified list file. This file is created earlier in the RoboTask."
msg2=STRING|"This RoboTask will compress a list of predefined files with the WinRAR program."
msg20=STRING|"Two temporary files are created in the Windows directory."
msg21=STRING|"The first is a list of file paths to backup and the second is a list of file paths to exclude."
msg22=STRING|"These two files are removed after WinRAR has finished creating the RAR file."
msg23=STRING|"I created these files as part of the task so that the entire configuration of the backup process is maintained within the RoboTask."
msg24=STRING|"This means you need to edit the RoboTask to define the list of files you want to include and exclude from the backup."
msg26=STRING|"The name of the RAR backup file is called ""my-backup.RAR"" which can be changed to suit your needs."
msg27=STRING|"I noticed that I needed to specify the RAR 3 letter extension in uppercase to create a RAR file or else it would create a .EXE self-extracting file."
msg28=STRING|"Not sure if this was just my default WinRAR settings overriding my command line switches."
msg29=STRING|"Also check the path to the WinRAR executable is correct if it differs from the path I have specified."
msg31=STRING|"All the file names and locations throughout the RoboTask are stored in variables to make it easier to maintain."
msg33=STRING|"I hope you find this RoboTask useful. I will continue to update it, so if you have any questions just post a message on the RoboTask forums for me."
msg4=STRING|"Obviously you need to have WinRAR installed on your computer for this RoboTask to run successfully."
msg6=STRING|"I have set a few commands and switches for WinRAR when running this RoboTask."
msg8=STRING|"Commands:"
msg9=STRING|"a = add files to an archive"
msgcount=STRING|"34"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action10]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action11]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""COMMAND"" with value ""a"""
Params=FOLDER
[Actions\Action11\Params]
varname=STRING|"COMMAND"
varvalue=STRING|"a"
[Actions\Action12]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""SWITCH"" with value ""-cfg- -m5 -r -x@{EXCLUDELISTFILE} -ibck -ed"""
Params=FOLDER
[Actions\Action12\Params]
varname=STRING|"SWITCH"
varvalue=STRING|"-cfg- -m5 -r -ibck -ed -hpMyPassword -x@{EXCLUDELISTFILE}"
[Actions\Action13]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""ARCHIVE"" with value ""my-backup.RAR"""
Params=FOLDER
[Actions\Action13\Params]
varname=STRING|"ARCHIVE"
varvalue=STRING|"my-backup.RAR"
[Actions\Action14]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""WinRAR.exe"""
Params=FOLDER
[Actions\Action14\Params]
params=STRING|"{COMMAND} {SWITCH} {ARCHIVE} @{LISTFILE}"
program=STRING|"C:\Program Files\WinRAR\WinRAR.exe"
runas=STRING|"0"
variable=STRING|"WINRAR_COMPLETE"
wait=STRING|"2"
workdir=STRING|"C:\System_Backup"
[Actions\Action15]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action15\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"1"
value1=STRING|"{WINRAR_COMPLETE}"
value2=STRING|"0"
[Actions\Action16]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER
[Actions\Action16\Params]
Count=STRING|"2"
deletedirs=STRING|"0"
file0=STRING|"{LISTFILE}"
file1=STRING|"{EXCLUDELISTFILE}"
subdir=STRING|"0"
ToRecycleBin=STRING|"1"
[Actions\Action17]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_QUESTION"
Enabled=INTEGER|-1
Name=STRING|"Question Dialog"
Params=FOLDER
[Actions\Action2\Params]
abortif=STRING|"0"
autotime=STRING|"0"
buttons=STRING|"1"
message=STRING|"""Have you configured this RoboTask to run on your machine "",""with your own settings? Do you want to continue running "",""this RoboTask?"""
time=STRING|"60"
[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LISTFILE"" with value ""{WINDIR}\backup-my-documents-list-file.lst"""
Params=FOLDER
[Actions\Action3\Params]
varname=STRING|"LISTFILE"
varvalue=STRING|"{WINDIR}\backup-my-documents-list-file.lst"
[Actions\Action4]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action4\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{FILEEXISTS({LISTFILE})}"
[Actions\Action5]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file {LISTFILE}"
Params=FOLDER
[Actions\Action5\Params]
fileexists=STRING|"0"
filname=STRING|"{LISTFILE}"
line0=STRING|"C:\Program Files\TestFolder\*.*"
linecount=STRING|"1"
[Actions\Action6]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action7]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""EXCLUDELISTFILE"" with value ""{WINDIR}\backup-my-documents-exclude-list-file.lst"""
Params=FOLDER
[Actions\Action7\Params]
varname=STRING|"EXCLUDELISTFILE"
varvalue=STRING|"{WINDIR}\backup-my-documents-exclude-list-f ile.lst"
[Actions\Action8]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action8\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"3"
value1=STRING|"{FILEEXISTS({EXCLUDELISTFILE})}"
[Actions\Action9]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file {EXCLUDELISTFILE}"
Params=FOLDER
[Actions\Action9\Params]
fileexists=STRING|"0"
filname=STRING|"{EXCLUDELISTFILE}"
line0=STRING|"C:\Program Files\TestFolder\SubFolder\*.*"
linecount=STRING|"1"
Here is a RoboTask to WinRAR files.
-
- Posts: 46
- Joined: Tue Apr 27, 2004 7:50 pm
Here is a RoboTask to WinRAR files.
Last edited by BrianSmith on Tue May 04, 2004 9:27 am, edited 1 time in total.