Unable to move a folder

Discuss RoboTask here
Post Reply
Fatboy40
Posts: 5
Joined: Mon Sep 05, 2005 5:44 am

Unable to move a folder

Post by Fatboy40 »

Hi, I've got a task below that checks a selected folder for the date when a file was last modified and I added an 'If Then' at the end to move the folder to another location however the move allways fails (step 21)...
;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|2091259954
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task2"
Hide=INTEGER|0
ID=INTEGER|620566288
Name=STRING|"W&B - Find the latest modified file in 'clients' folder and move to archive."
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
Action17=FOLDER
Action18=FOLDER
Action19=FOLDER
Action2=FOLDER
Action20=FOLDER
Action21=FOLDER
Action22=FOLDER
Action23=FOLDER
Action24=FOLDER
Action25=FOLDER
Action26=FOLDER
Action27=FOLDER
Action28=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER
[Actions\Action1]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|0
Name=STRING|"Show ""This task finds the latest file in a specified 'client' folder."""
Params=FOLDER
[Actions\Action1\Params]
icon=STRING|"1"
msg0=STRING|"This task finds the latest file in a specified 'client' folder."
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action10]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action10\Params]
createmode=STRING|"1"
date1=STRING|"20040520"
date2=STRING|"20040520"
destvar=STRING|"CURRENT_FILENAME"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"{Current_Folder}\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"1"
timevar=STRING|"CURRENT_DATETIME"
WithoutPath=STRING|"1"
[Actions\Action11]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action11\Params]
message=STRING|"Current DateTime {CURRENT_DATETIME}"
type=STRING|"0"
[Actions\Action12]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action12\Params]
message=STRING|"Latest DateTime {LATEST_DATETIME}"
type=STRING|"0"
[Actions\Action13]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action13\Params]
case=STRING|"0"
operator=STRING|"3"
type=STRING|"2"
value1=STRING|"{CURRENT_DATETIME}"
value2=STRING|"{LATEST_DATETIME}"
[Actions\Action14]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action14\Params]
message=STRING|"CURRENT_DATETIME {CURRENT_DATETIME} > LATEST_DATETIME {LATEST_DATETIME}"
type=STRING|"0"
[Actions\Action15]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LATEST_FILENAME"" with value ""{CURRENT_FILENAME}"""
Params=FOLDER
[Actions\Action15\Params]
expand=STRING|"1"
varname=STRING|"LATEST_FILENAME"
varvalue=STRING|"{CURRENT_FILENAME}"
[Actions\Action16]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""LATEST_DATETIME"" with value ""{CURRENT_DATETIME}"""
Params=FOLDER
[Actions\Action16\Params]
expand=STRING|"1"
varname=STRING|"LATEST_DATETIME"
varvalue=STRING|"{CURRENT_DATETIME}"
[Actions\Action17]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action18]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action19]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Folder: {Current_Folder}"""
Params=FOLDER
[Actions\Action19\Params]
icon=STRING|"1"
msg0=STRING|"Folder: {Current_Folder}"
msg1=STRING|"Latest file: {LATEST_FILENAME}"
msg2=STRING|"Modified: {LATEST_DATETIME}"
msgcount=STRING|"3"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action2]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create variable ""LATEST_FILENAME"" with value ""Not Found"""
Params=FOLDER
[Actions\Action2\Params]
expand=STRING|"0"
varname=STRING|"LATEST_FILENAME"
varvalue=STRING|"Not Found"
[Actions\Action20]
ActionID=STRING|"A_DIALOG_QUESTION"
Enabled=INTEGER|-1
Name=STRING|"Question Dialog"
Params=FOLDER
[Actions\Action20\Params]
abortif=STRING|"0"
action=STRING|"1"
autotime=STRING|"1"
buttons=STRING|"1"
message=STRING|"""Do you want to move {CURRENT_FOLDER} to \\winch-"",""a\archived\clients ?."""
time=STRING|"60"
variable=STRING|"{MOVE}"
[Actions\Action21]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action21\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{MOVE}"
value2=STRING|"TRUE"
[Actions\Action22]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER
[Actions\Action22\Params]
destdir=STRING|"\\Winch-a\archived\clients"
f_count=STRING|"1"
file0=STRING|"{CURRENT_FOLDER}"
ifexists=STRING|"0"
move=STRING|"1"
subdir=STRING|"0"
[Actions\Action23]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action24]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""CURRENT_FOLDER"""
Params=FOLDER
[Actions\Action24\Params]
varname=STRING|"CURRENT_FOLDER"
[Actions\Action25]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""CURRENT_FILE"""
Params=FOLDER
[Actions\Action25\Params]
varname=STRING|"CURRENT_FILE"
[Actions\Action26]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""LATEST_DATETIME"""
Params=FOLDER
[Actions\Action26\Params]
varname=STRING|"LATEST_DATETIME"
[Actions\Action27]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""LATEST_FILENAME"""
Params=FOLDER
[Actions\Action27\Params]
varname=STRING|"LATEST_FILENAME"
[Actions\Action28]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""MOVE"""
Params=FOLDER
[Actions\Action28\Params]
varname=STRING|"MOVE"
[Actions\Action3]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create variable ""LATEST_DATETIME"" with value ""0"""
Params=FOLDER
[Actions\Action3\Params]
expand=STRING|"0"
varname=STRING|"LATEST_DATETIME"
varvalue=STRING|"0"
[Actions\Action4]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create variable ""MOVE"" with value ""FALSE"""
Params=FOLDER
[Actions\Action4\Params]
expand=STRING|"0"
varname=STRING|"MOVE"
varvalue=STRING|"FALSE"
[Actions\Action5]
ActionID=STRING|"A_DIALOG_BROWSEFOLDERS"
Enabled=INTEGER|-1
Name=STRING|"Browse for Folders"
Params=FOLDER
[Actions\Action5\Params]
caption=STRING|"Select Folder"
default=STRING|"None"
filter=STRING|"Text files|*.txt|All files|*.*|"
folder=STRING|"\\Winch-a\data\Data\CLIENTS"
variable=STRING|"CURRENT_FOLDER"
[Actions\Action6]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action6\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{Current_Folder}"
value2=STRING|"None"
[Actions\Action7]
ActionID=STRING|"A_TASKS_STOP"
Enabled=INTEGER|-1
Name=STRING|"Stop Task ""Find the latest/newest modified file in a folder."""
Params=FOLDER
[Actions\Action7\Params]
taskid=STRING|"417887772"
[Actions\Action8]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|0
Name=STRING|"Set variable ""CURRENT_FOLDER"" with value ""{TempDir}"""
Params=FOLDER
[Actions\Action8\Params]
expand=STRING|"1"
varname=STRING|"CURRENT_FOLDER"
varvalue=STRING|"{TempDir}"
[Actions\Action9]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
... I can't see what I've done wrong ?.
Can anyone help ?, thanks.
Clive.
Fatboy40
Posts: 5
Joined: Mon Sep 05, 2005 5:44 am

Unable to move a folder

Post by Fatboy40 »

Hmmm, it now seems that an old task that I had created that moved a folder no longer works as well :(
The Copy/Move File is told to use UNC paths, is this something that no longer works in version 2.2.1 (I just upgraded this morning). 
Fatboy40
Posts: 5
Joined: Mon Sep 05, 2005 5:44 am

Unable to move a folder

Post by Fatboy40 »

Ok, maybe not.
I just tried it with drive letters and the copy/move still fails
Fatboy40
Posts: 5
Joined: Mon Sep 05, 2005 5:44 am

Unable to move a folder

Post by Fatboy40 »

Right, I removed 2.2.1 and put 2.1 back on and the task above works absolutely fine, arrrgh
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to move a folder

Post by Oleg »

Try to use {CURRENT_FOLDER}\*.* value in Files parameter instead of "{CURRENT_FOLDER}" in Copy/Move step. Your mistake is here.
Last edited by Oleg on Thu Sep 08, 2005 11:24 am, edited 1 time in total.
Fatboy40
Posts: 5
Joined: Mon Sep 05, 2005 5:44 am

Unable to move a folder

Post by Fatboy40 »

Oleg wrote:Try to use {CURRENT_FOLDER}\*.* value in Files parameter instead of "{CURRENT_FOLDER}" in Copy/Move step. Your mistake is here.

Oleg,
Your reply is correct if I wanted to move the files within the folder however I wish to move the folder itself (and its associated contents). This is something that definately works prior to the latest release of robocopy...
Isbjorn
Posts: 3
Joined: Wed Aug 31, 2005 7:07 am
Location: United States
Contact:

Unable to move a folder

Post by Isbjorn »

I am having a similar problem. I'm using RoboTask to back up certain
folders with the "synchronize" task. It works fine if I run it
manually, but it never works if I set it run on a schedule. It will
only synch a few of the files and subfolders.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to move a folder

Post by Oleg »

"Synchronize folder" doesn't depend of method of starting the task: manually or by some triggering event. It would be more logically to use "Folder monitor" event for this task. I always use "folder monitor" triggering event for synchronization of necessary folders.
Last edited by Oleg on Thu Sep 15, 2005 2:59 am, edited 1 time in total.
Post Reply