FTP Delete Folder

Discuss RoboTask here

FTP Delete Folder

Postby marcolobaido » Wed Jan 08, 2020 4:20 pm

Hi, how can I remove a non empty FTP folder?

I: 08/01/2020 14:59:18: Executing "5.FTP Remove Folder"
E: 08/01/2020 14:59:18: FtpRemoveDirectory fails with message: 550 The directory is not empty.
E: 08/01/2020 14:59:18: An error occurred. Step #5 (FTP Remove Folder).
E: 08/01/2020 14:59:18: Task execution is aborted
marcolobaido
 
Posts: 65
Joined: Thu Jul 02, 2015 3:54 pm

Re: FTP Delete Folder

Postby Oleg » Wed Jan 15, 2020 1:48 pm

You have to remove files in folder first
look at my example
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|"Task170"
Hide=INTEGER|0
ID=INTEGER|-220125692
LogOnAsUser=INTEGER|1
Name=STRING|"Test delete folder"
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
Action3=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"FTP Log On"
Params=FOLDER

[Actions\Action1\Params]
anonymous=STRING|"1"
host=STRING|"localhost"
passive=STRING|"1"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
proxykind=STRING|"0"
useproxy=STRING|"0"
username=STRING|"anonymous"

[Actions\Action2]
ActionID=STRING|"A_FTP_DELETEFILE"
Enabled=INTEGER|-1
Name=STRING|"FTP Delete File"
Params=FOLDER

[Actions\Action2\Params]
file=STRING|"/test2/*.*"

[Actions\Action3]
ActionID=STRING|"A_FTP_REMOVEFOLDER"
Enabled=INTEGER|-1
Name=STRING|"FTP Remove Folder"
Params=FOLDER

[Actions\Action3\Params]
folder=STRING|"/test2"


Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Oleg Yershov
Oleg
Site Admin
 
Posts: 2586
Joined: Thu Jan 01, 1970 1:00 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 32 guests

cron