Page 1 of 1

Move folder and files to folder in same folder

Posted: Sat Jul 26, 2014 2:54 pm
by rice1973
Hi Oleg,

I cannot get it fixed to build a move task.

Folderstructure is like below;

I want to move the folders orbitvu and orbitvu12_basic and the file 18765-266.10.300.html into the folder 18765-266.10.300

The name of the folder 18765-266.10.300 is variable and also the name of the 18765-266.10.300.html file.

The name of the parent folder is 3dmap.

I

Re: Move folder and files to folder in same folder

Posted: Sat Jul 26, 2014 6:11 pm
by Oleg
See my example:

Code: Select all

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1416408852
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task117"
Hide=INTEGER|0
ID=INTEGER|620029868
LogOnAsUser=INTEGER|1
Name=STRING|"Rename Files and folders"
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_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create local variable ""FOLDER"" with value ""18765-266.10.300"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"FOLDER"
varvalue=STRING|"18765-266.10.300"

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

[Actions\Action2\Params]
folder=STRING|"C:\Temp\test"

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

[Actions\Action3\Params]
destdir=STRING|"{folder}"
f_count=STRING|"3"
file0=STRING|"{folder}.html"
file1=STRING|"orbitvu"
file2=STRING|"orbitvu12_basic"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"


Re: Move folder and files to folder in same folder

Posted: Sat Jul 26, 2014 9:49 pm
by rice1973
Hi,

The foldername 18765-266.10.300 also has to be variable.
So the task must "read" it from the foldername.

Now you set is as a "solid" valeu.

Re: Move folder and files to folder in same folder

Posted: Sat Aug 02, 2014 7:58 am
by rice1973
Hi Oleg,

I modified the task, still does not work. Can you look?

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|1981091247
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task117"
Hide=INTEGER|0
ID=INTEGER|620029868
LogOnAsUser=INTEGER|1
Name=STRING|"Rename Files and folders (imported)"
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
Action4=FOLDER
Action5=FOLDER

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

[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"FOLDER"

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

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20130118"
date2=STRING|"20130118"
destvar=STRING|"FOLDER"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\3dmap\360\?????-???.??.???"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"1"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

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

[Actions\Action3\Params]
folder=STRING|"C:\3dmap"

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

[Actions\Action4\Params]
destdir=STRING|"{folder}"
f_count=STRING|"3"
file0=STRING|"{folder}.html"
file1=STRING|"orbitvu12"
file2=STRING|"orbitvu12_basic"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"

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

Re: Move folder and files to folder in same folder

Posted: Sat Aug 02, 2014 1:21 pm
by Oleg
I think that you should to move step#3 (change folder) out of the loop.
It seem this example can help you:

Code: Select all

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|933306365
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task505"
Hide=INTEGER|0
ID=INTEGER|620029868
LogOnAsUser=INTEGER|1
Name=STRING|"Rename Files and folders"
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
Action4=FOLDER
Action5=FOLDER

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

[Actions\Action1\Params]
expand=STRING|"0"
varkind=STRING|"1"
varname=STRING|"FOLDER"

[Actions\Action2]
ActionID=STRING|"A_FOLDER_CHANGE"
Enabled=INTEGER|-1
Name=STRING|"Change Folder (C:\3dmap\360\)"
Params=FOLDER

[Actions\Action2\Params]
folder=STRING|"C:\3dmap\360\"

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

[Actions\Action3\Params]
createmode=STRING|"1"
date1=STRING|"20130118"
date2=STRING|"20130118"
destvar=STRING|"FOLDER"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"?????-???.??.???"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"1"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"0"
timesize=STRING|"0"
WithoutPath=STRING|"0"

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

[Actions\Action4\Params]
destdir=STRING|"{folder}"
f_count=STRING|"3"
file0=STRING|"{folder}.html"
file1=STRING|"orbitvu12"
file2=STRING|"orbitvu12_basic"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"

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

Re: Move folder and files to folder in same folder

Posted: Sat Aug 02, 2014 5:27 pm
by rice1973
Solved!