FTP Delete File Not Working

Discuss RoboTask here
Post Reply
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

FTP Delete File Not Working

Post by John Long »

I have read the Topic: FTP
delete file not working?
With that said I am starting a new discussion because I did not think that my
post in that topic would be replied to.

I tried the change folder command and that did not work for me. I am assuming
that when Oleg said "Try to use "FTP Change Folder" action
before file deletion" that Oleg meant to change to the folder that the
file is in that you want to delete? Which happens to be the home folder of my
ftp user. So I issue the command before the ftp delete file command: "FTP
Change Folder /vol1/backedup/mars/" Then "FTP Delete File
mars.zip" and I get the following error.
E: 9/29/2004 8:50:39
AM:
FtpDeleteFile fails with
message: 550 Could not delete file "/vol1/backedup/mars/- [RWCEAFMS]
jlong        &nbsp ;         &nbsp ;         &nbsp ; 
0 Sep 29 08:39 mars.zip" ,

I know that the file can be deleted because I login through a command window
and can delete it with no problem. What am I doing wrong?

Thanks.
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

FTP Delete File Not Working

Post by John Long »

I can use voyager ftp to delete files over ftp after it downloads
files. This program also has a Service scheduler built in. Now why can
voyager delete the file via ftp and robotask can not?
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

FTP Delete File Not Working

Post by Oleg »

I look at you previous post:
Then "FTP Delete File mars.zip" and I get the following error.
E: 9/29/2004 8:50:39 AM: FtpDeleteFile fails with message: 550 Could not delete file "/vol1/backedup/mars/- [RWCEAFMS] jlong     ;       ;     ;   0 Sep 29 08:39 mars.zip" ,
"/vol1/backedup/mars/- [RWCEAFMS] jlong     ;       ;     ;   0 Sep 29 08:39 mars.zip"
Is it a file name? If yes I am afraid that it is invalid file name. I recommend you to use ValidFileName macrofunction when you form a new file name.
One question: what operating system at your FPT server?
Now why can voyager delete the file via ftp and robotask can not?
For working with FTP server RoboTask use internal universal windows engine. "FTP Voyager" is a specialized FTP client and I think that do it by a some complex way or using some server-specific functions.
Last edited by Oleg on Mon Oct 11, 2004 10:27 am, edited 1 time in total.
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

FTP Delete File Not Working

Post by John Long »

The file name is (unc path) \vol1\backedup\mars\mars.zip
The ftp server is running on Netware 6.5
I can delete it using dos ftp. I have even tried to delete text files with
robotask and they do not delete either.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

FTP Delete File Not Working

Post by Oleg »

In this case why RoboTask wrote to logfile : E: 9/29/2004 8:50:39 AM: FtpDeleteFile fails with message: 550 Could not delete file "/vol1/backedup/mars/- [RWCEAFMS] jlong    ;    ;  ;   ;   0 Sep 29 08:39 mars.zip"?

Check your task, please. RoboTask tried to delete file "/vol1/backedup/mars/- [RWCEAFMS] jlong    ;    ;  ;   ;    0 Sep 29 08:39 mars.zip" (not "/vol1/backedup/mars/mars.zip") and got an error, of course.
If you use a variable, insert the "Show Message" with this variable before "FTP Delete"

I think that you use a text loop based on "dir" listing (may be).
Last edited by Oleg on Mon Oct 11, 2004 10:57 am, edited 1 time in total.
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

FTP Delete File Not Working

Post by John Long »

here is the task:
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task4"
Hide=INTEGER|0
ID=INTEGER|1341498243
Name=STRING|"ftp delete"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[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|"0"
host=STRING|""
passive=STRING|"0"
password=STRING|""
port=STRING|"21"
username=STRING|""

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

[Actions\Action2\Params]
file=STRING|"test.txt"

[Actions\Action3]
ActionID=STRING|"A_FTP_LOGOFF"
Enabled=INTEGER|-1
Name=STRING|"FTP Log Off"

here is the log:
I: 10/11/2004 10:00:21 AM: ****** Starting task... ******************
I: 10/11/2004 10:00:21 AM: Task started with priority: Normal
I: 10/11/2004 10:00:21 AM: Executing "FTP Log On"
I: 10/11/2004 10:00:21 AM: Executing "FTP Delete File"
E: 10/11/2004 10:00:21 AM: FtpDeleteFile fails with message: 550 Could
not delete file "/VOL1/Backedup/Mars/- [RWCEAFMS]
jlong        &nbsp ;         &nbsp ;         &nbsp ; 
0 Oct 11 10:01 test.txt" ,
I: 10/11/2004 10:00:21 AM: 0 files is deleted
I: 10/11/2004 10:00:21 AM: Executing "FTP Log Off"
I: 10/11/2004 10:00:21 AM: Task executed successfully
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

FTP Delete File Not Working

Post by Oleg »

Hm-m... Probably Netware FTP returns full "dir" string instead of file name at files enumeration...
Try to run following task (see below) and send me a few lines from log file.

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1664541561
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task57"
Hide=INTEGER|0
ID=INTEGER|1035740108
Name=STRING|"FTP File Loop..."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|1

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=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|"oleg"
passive=STRING|"1"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
username=STRING|"anonymous"

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

[Actions\Action2\Params]
filenameonly=STRING|"0"
folder=STRING|"*.*"
sizesave=STRING|"0"
subfolders=STRING|"0"
timesave=STRING|"0"
varname=STRING|"FTP_FILE"

[Actions\Action3]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER

[Actions\Action3\Params]
message=STRING|"{ftp_file}"
type=STRING|"2"

[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
John Long
Posts: 25
Joined: Thu Jul 22, 2004 12:23 pm

FTP Delete File Not Working

Post by John Long »

I changed the server address and login info and ran the task. There are
no log entries other that the master log that states that the task was
run.
Post Reply