Packing large number of directories and f

Discuss RoboTask here
Post Reply
aLabrat2
Posts: 1
Joined: Mon Jul 07, 2008 8:01 am
Location: Canada

Packing large number of directories and f

Post by aLabrat2 »

HiI’m trying to stop an ftp server, pack a large number of small .txt files located in a large number of directories that are have been uploaded to my FTP server, then re-start the FTP server once all the files for that day have been pack and moved to another directory(C:\sardata\emsZIP) .  The situation is like this, directory C:\sardata\emsdata\ receives many directories containing a number of small txt files each (XXXdirectory\yyyy.txt).  Once a day I would like to pack all the received directory and txt files into on zip file.  I do not want to include all the directory structure in the ZIP file, only the uploaded directories (XXXdirectory) how would I go about this?  Another thing I noticed when running “pack files” is it does not stop when all files are packed it seams to just hang without stopping it self.  Is this normal?  as you can surmise I’m not a programmer :o)   Thanks for any help you can provideChris
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Packing large number of directories and f

Post by Oleg »

What is the mask of folders "XXXdirectory"? I think that it is "???directory"
I think that you have to pack files in the loop.
Algorithm is such:

File loop by "???directory" // by folders only
   Pack TXT files in current directory
end loop

Also see the example below. If there is nothing to pack, the task may generate an error "Error - no files to zip!". Thus, set the "if error occured" to "continue execution" value (Advanced tab in task editor).

;*****************************
;* RoboTask Task file       
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|48123700
ContinueOnError=INTEGER|1
ExternalName=STRING|"Task642"
Hide=INTEGER|0
ID=INTEGER|1369484792
Name=STRING|"Pack specified folders"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FOLDER_CHANGE"
Enabled=INTEGER|-1
Name=STRING|"Change Folder (C:\dest)"
Params=FOLDER

[Actions\Action1\Params]
folder=STRING|"C:\dest"

[Actions\Action2]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20080709"
date2=STRING|"20080709"
destvar=STRING|"C_DIR"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"????????dir"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"1"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER

[Actions\Action3\Params]
message=STRING|"{c_dir}"
type=STRING|"3"

[Actions\Action4]
ActionID=STRING|"A_ZIP_PACK"
Enabled=INTEGER|-1
Name=STRING|"Pack Files"
Params=FOLDER

[Actions\Action4\Params]
action=STRING|"0"
coment0=STRING|"{DateTime}, {DayOfWeek}"
coment1=STRING|"This zip-archive created by RoboTask (C) 2003 Neowise"
comentcount=STRING|"2"
compreslevel=STRING|"1"
destfile=STRING|"C:\dest\zipfile.zip"
dosformat=STRING|"0"
file0=STRING|"{c_dir}\*.txt"
filecount=STRING|"1"
includesubfolders=STRING|"1"
incsysandhidden=STRING|"0"
junkdirnames=STRING|"0"
password=STRING|"2514525451269852596514956"

[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Post Reply