moving files up one level without knowing parent folder name

Discuss RoboTask here
Post Reply
PPX
Posts: 7
Joined: Sat Aug 25, 2018 11:11 pm

moving files up one level without knowing parent folder name

Post by PPX »

hi - I don't know the parent folder name and I need to move files in the child folder up.

I am trying

..\

\..\

but I get errors such as

'The system cannot move the file to a different disk drive.'

I am running it with a file loop, tried both with full path and without full path.

when using wildcards on standalone copy/move file, it works.

is there some workaround?

I have full permissions, but the parent folder is variable out of my scope

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

Re: moving files up one level without knowing parent folder

Post by Oleg »

If you know the file so you know the folder. Also you can calculate the parent folder.
Could you send your example. It seems I don't understand your problem correctly...

Look at my example. It works

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task534"
Hide=INTEGER|0
ID=INTEGER|1870600849
LogOnAsUser=INTEGER|1
Name=STRING|"Move to parent"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER

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

[Actions\Action1\Params]
folder=STRING|"d:\temp\111"

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

[Actions\Action2\Params]
destdir=STRING|".."
f_count=STRING|"1"
file0=STRING|"test.txt"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"1"
rename=STRING|"0"
renamemask=STRING|"*.*.new"
subdir=STRING|"0"
system=STRING|"1"
Oleg Yershov
Post Reply