Jump to content

How can I delete a file in my ftp server?


 Share

Recommended Posts

I download a file from my ftp server and I wanna delete it after I succesfully download it, because I will possibley upload a new file with the same name and, maybe, the same content as the file existed in the server.

Any advice would be appreciated

Link to comment
Share on other sites

How do you do it now? Let me put it another way...if you need to upload a file, or delete a file from the server, what method do you currently use?

I've no idea of deleting a file from the server or uploading a file to the server. I read the help file carefully, but I do not find any usful info.

I'm considering to add the timestamp in the file which happens to be a text file. After download the file, I should process the timestamp to decide whether this file is newer than the one downloaded earlier. But this is not the best solution, there must be a better one, but what it is?

Edited by chenxu
Link to comment
Share on other sites

I've no idea of deleting a file from the server or uploading a file to the server. I read the help file carefully, but I do not find any usful info.

I'm considering to add the timestamp in the file which happens to be a text file. After download the file, I should process the timestamp to decide whether this file is newer than the one downloaded earlier. But this is not the best solution, there must be a better one, but what it is?

Have a look at Wouter's ftp UDF in the sticky section of Example scripts. It has a FTPDelFile function.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

in a dosbox it's pretty easy to FTP ..

(in case you don't want to read and learn the entire UDF..)

ftp<enter>
open localhost 21
user administrator 12345678
lcd c:\
cd files
delete file1.txt
bye

you can also create this as a textfile and type c:\>ftp -s:ftpscript.txt to have it go automatic..

Edited by lordofthestrings
Link to comment
Share on other sites

I happened to hear AutoIt a few days ago, and in these days, I spent almost my spare time reading its help file. UDF has not been read. Today, I started to read the "IE Management" of UDF, I found the UDF is wouderful, I do not think that we can create macros like this before. I will read all this UDFs in the next days.

Link to comment
Share on other sites

in a dosbox it's pretty easy to FTP ..

(in case you don't want to read and learn the entire UDF..)

ftp<enter>
open localhost 21
user administrator 12345678
lcd c:\
cd files
delete file1.txt
bye

you can also create this as a textfile and type c:\>ftp -s:ftpscript.txt to have it go automatic..

I connect to internet by a http proxy which I can not access to from a dosbox. I firstly use AutoIt to set the FtpSetProxy function to set the proxy and download the file
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...