Extract Wildcards

Discuss RoboTask here
Post Reply
m1ngle
Posts: 6
Joined: Tue Jun 23, 2015 10:15 pm

Extract Wildcards

Post by m1ngle »

Hello;

I am having trouble extracting a file using a wildcard in the name. The support documentation says that it is supported, but I am failing every time.

When I use C:\Users\mingle\Documents\3186\3186_0515_Send.zip in the File to Unzip line, the task works fine.

When I use C:\Users\mingle\Documents\3186\3186_*.zip it does not.

Do you have any idea how to make it general?

Thanks

Matt
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Extract Wildcards

Post by Oleg »

You can do this by using File Loop.
Look at the example below:

Code: Select all

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

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

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

[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20150708"
date2=STRING|"20150708"
destvar=STRING|"ZIPFILE"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\Users\mingle\Documents\3186\3186_*.zip"
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\Action2]
ActionID=STRING|"A_ZIP_EXTRACT"
Enabled=INTEGER|-1
Name=STRING|"Extract Files"
Params=FOLDER

[Actions\Action2\Params]
destdir=STRING|"{TempDir}\uzipped\{ZIPfile}"
filetounzip=STRING|"{ZIPfile}"
overwrite=STRING|"0"
password=STRING|"2540125970251992571416055"
passwordmode=STRING|"0"
skipolderfiles=STRING|"0"
unzipfiles=STRING|"*.*"
usefoldernames=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Oleg Yershov
m1ngle
Posts: 6
Joined: Tue Jun 23, 2015 10:15 pm

Re: Extract Wildcards

Post by m1ngle »

Hello Oleg;

Thanks for the solution. It worked great. I only needed to change the destination folder and all files extracted correctly.
Post Reply