objFTP.Rename - WeOnlyDo Discussion board

objFTP.Rename (wodFtpDLX / wodFtpDLX.NET)

by stamman, Wednesday, April 25, 2007, 08:35 (6183 days ago)

Hello,

can anybody please help me with the following problem.

I do a objFTP.Rename NewRemotePath , OldRemotePath of a file.
F.E. objFTP.Rename /DONE/AB250407.txt , /TODO/AB250407.txt

When the file doesn't exist, the vbs-script fails. How can I prevent this ?

Thanks in advance,

Greetings Peter Stam

Re: objFTP.Rename

by wodDamir, Wednesday, April 25, 2007, 10:27 (6183 days ago) @ stamman

Hi Peter,

You can skip the error by using On Error Resume Next line, which will cause the vbs to process the next line of the code without failing.

If you want to retrieve the error which occured, you can do it by reading the LastError Property.

Regards,
Damba