Page 1 of 1

Moving 10 files...

Posted: Sun Apr 02, 2006 5:53 pm
by mengel
I just downloaded the trial of Robotask and have been reading the forum
to figure out if this program will do what I want it to do:

I have a folder with 5000 files with the same extension. I want
RoboTask to grab the first 10 and move them into a subdirectory that it
creates - 0001. Then it needs to grab the next 10 files and move it
into 0002 folder, etc until all the files in the directory are in
subdirectories with 10 files in each.

Is this possible? If so, I'm sold!

Moving 10 files...

Posted: Tue Apr 04, 2006 12:28 am
by Oleg
Yes, of course. See example below. This task move all files from "c:\source" folder into particular subfolders in "c:\dest" folder (by 10 files in each subfolder). If you want to use folder names in 000N format you should use "Evaluate" action (from BASIC plugin).
Save text of task into file and use menu "Task | Import" to inport into RoboTask.

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|565106205
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task403"
Hide=INTEGER|0
ID=INTEGER|1392848488
Name=STRING|"Sort by 10 files in each subfolder"
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
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""CURRENT_NUM"" with value ""0"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"CURRENT_NUM"
varvalue=STRING|"0"

[Actions\Action10]
ActionID=STRING|"A_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""sub_folder"""
Params=FOLDER

[Actions\Action10\Params]
incement=STRING|"1"
vaiable=STRING|"sub_folder"

[Actions\Action11]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

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

[Actions\Action13]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""CURRENT_NUM"""
Params=FOLDER

[Actions\Action13\Params]
varname=STRING|"CURRENT_NUM"

[Actions\Action14]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""ROOT_FOLDER"""
Params=FOLDER

[Actions\Action14\Params]
varname=STRING|"ROOT_FOLDER"

[Actions\Action15]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""SUB_FOLDER"""
Params=FOLDER

[Actions\Action15\Params]
varname=STRING|"SUB_FOLDER"

[Actions\Action16]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""C_FILENAME"""
Params=FOLDER

[Actions\Action16\Params]
varname=STRING|"C_FILENAME"

[Actions\Action2]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""ROOT_FOLDER"" with value ""c:\dest\{Year}{MonthNo}{Day}{Hours}{Minutes}"""
Params=FOLDER

[Actions\Action2\Params]
expand=STRING|"1"
varname=STRING|"ROOT_FOLDER"
varvalue=STRING|"c:\dest\{Year}{MonthNo}{Day}{Hours}{Minutes }"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""SUB_FOLDER"" with value ""0"""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"0"
varname=STRING|"SUB_FOLDER"
varvalue=STRING|"0"

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

[Actions\Action4\Params]
createmode=STRING|"1"
date1=STRING|"20060404"
date2=STRING|"20060404"
destvar=STRING|"C_FILENAME"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\source\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action5]
ActionID=STRING|"A_FOLDER_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create Folder ({root_folder}\{sub_folder})"
Params=FOLDER

[Actions\Action5\Params]
newfolder=STRING|"{root_folder}\{sub_folder}"

[Actions\Action6]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER

[Actions\Action6\Params]
destdir=STRING|"{root_folder}\{sub_folder}"
f_count=STRING|"1"
file0=STRING|"{c_filename}"
ifexists=STRING|"1"
move=STRING|"1"
subdir=STRING|"0"

[Actions\Action7]
ActionID=STRING|"A_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""Current_num"""
Params=FOLDER

[Actions\Action7\Params]
incement=STRING|"1"
vaiable=STRING|"Current_num"

[Actions\Action8]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action8\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"1"
value1=STRING|"{Current_num}"
value2=STRING|"10"

[Actions\Action9]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""CURRENT_NUM"" with value ""0"""
Params=FOLDER

[Actions\Action9\Params]
expand=STRING|"0"
varname=STRING|"CURRENT_NUM"
varvalue=STRING|"0"