i need help to CREATE FOLDER action

Discuss RoboTask here
Post Reply
guillermo
Posts: 2
Joined: Wed Sep 13, 2017 11:05 am

i need help to CREATE FOLDER action

Post by guillermo »

Hello i need help to create a task for next action:
Action Create folder : example
1. input folder/siemens_3223_01.pdf, siemens_3223_02.pdf, siemens_3223_03.pdf
2.Wach for files
3. Create a new folder: input folder/siemens_3223/siemens_3223_01.pdf, siemens_3223_02.pdf, siemens_3223_03.pdf

if you can helpme i will very happyy jaja

Guille
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: i need help to CREATE FOLDER action

Post by Oleg »

Yes, of course this is possible
Look at the task below;

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1040932817
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task311"
Hide=INTEGER|0
ID=INTEGER|-68798012
LogOnAsUser=INTEGER|1
Name=STRING|"sort files"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action10=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""IN_FOLDER"" with value ""D:\input folder"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"IN_FOLDER"
varvalue=STRING|"D:\input folder"

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

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

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20170913"
date2=STRING|"20170913"
destvar=STRING|"FILENAME"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"{in_folder}\*.pdf"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_STR_POS"
Enabled=INTEGER|-1
Name=STRING|"STR Pos"
Params=FOLDER

[Actions\Action3\Params]
case=STRING|"0"
from=STRING|"1"
search=STRING|"_"
source=STRING|"{ExtractFileName({filename})}"
variable=STRING|"p"

[Actions\Action4]
ActionID=STRING|"A_STR_EXTRACT"
Enabled=INTEGER|-1
Name=STRING|"STR Extract"
Params=FOLDER

[Actions\Action4\Params]
amount=STRING|"{p}"
from=STRING|"1"
source=STRING|"{ExtractFileName({filename})}"
variable=STRING|"nam"

[Actions\Action5]
ActionID=STRING|"A_STR_BETWEEN"
Enabled=INTEGER|-1
Name=STRING|"STR Between"
Params=FOLDER

[Actions\Action5\Params]
begin=STRING|"_"
case=STRING|"0"
end=STRING|"_"
save=STRING|"0"
source=STRING|"{ExtractFileName({filename})}"
startpos=STRING|"1"
variable=STRING|"num"

[Actions\Action6]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|0
Name=STRING|"Show ""{FileName}"""
Params=FOLDER

[Actions\Action6\Params]
icon=STRING|"1"
msg0=STRING|"{FileName}"
msg1=STRING|"{nam}"
msg2=STRING|"{num}"
msg3=STRING|"{p}"
msgcount=STRING|"4"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action7]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NEWFOLDER"" with value ""{in_folder}\{nam}{num}"""
Params=FOLDER

[Actions\Action7\Params]
expand=STRING|"1"
varname=STRING|"NEWFOLDER"
varvalue=STRING|"{in_folder}\{nam}{num}"

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

[Actions\Action8\Params]
newfolder=STRING|"{NewFolder}"

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

[Actions\Action9\Params]
destdir=STRING|"{NewFolder}"
f_count=STRING|"1"
file0=STRING|"{FileName}"
hidden=STRING|"1"
ifexists=STRING|"1"
move=STRING|"1"
rename=STRING|"0"
renamemask=STRING|"*.*.new"
subdir=STRING|"0"
system=STRING|"1"
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Do not forget to enable the task after importing.

I creates the folder D:\input folder
Initial stat of the folder:

Code: Select all

 Directory of D:\input folder

13.09.2017  16:12    <DIR>          .
13.09.2017  16:12    <DIR>          ..
13.09.2017  15:59                 0 motorola_3571_01.pdf
13.09.2017  15:59                 0 motorola_3571_02.pdf
13.09.2017  15:59                 0 motorola_3571_03.pdf
13.09.2017  15:59                 0 siemens_3223_01.pdf
13.09.2017  15:59                 0 siemens_3223_02.pdf
13.09.2017  15:59                 0 siemens_3223_03.pdf
               6 File(s)              0 bytes
The status after execution of the task

Code: Select all

 Directory of D:\input folder

13.09.2017  16:16    <DIR>          .
13.09.2017  16:16    <DIR>          ..
13.09.2017  16:16    <DIR>          motorola_3571
13.09.2017  16:16    <DIR>          siemens_3223
               0 File(s)              0 bytes

 Directory of D:\input folder\motorola_3571

13.09.2017  16:16    <DIR>          .
13.09.2017  16:16    <DIR>          ..
13.09.2017  15:59                 0 motorola_3571_01.pdf
13.09.2017  15:59                 0 motorola_3571_02.pdf
13.09.2017  15:59                 0 motorola_3571_03.pdf
               3 File(s)              0 bytes

 Directory of D:\input folder\siemens_3223

13.09.2017  16:16    <DIR>          .
13.09.2017  16:16    <DIR>          ..
13.09.2017  15:59                 0 siemens_3223_01.pdf
13.09.2017  15:59                 0 siemens_3223_02.pdf
13.09.2017  15:59                 0 siemens_3223_03.pdf
               3 File(s)              0 bytes

     Total Files Listed:
               6 File(s)              0 bytes
I hope I understood your job correctly
Oleg Yershov
guillermo
Posts: 2
Joined: Wed Sep 13, 2017 11:05 am

Re: i need help to CREATE FOLDER action

Post by guillermo »

folders.JPG
folders.JPG (229.45 KiB) Viewed 11201 times
ok thanks works in lite version?
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: i need help to CREATE FOLDER action

Post by Oleg »

Unfortunately this task will not work in lite version.
RoboTask Lite doesn't contain Loops & Flows actions (File Loop) and String actions (STR Pos, STR Extract, STR Between)
Look at full feature table here, please: http://robotask.com/lite_vs_full/
Oleg Yershov
Post Reply