Solved

How do I delete a file from my FTP server?

Posted on 2004-10-21
254 Views
Last Modified: 2010-04-17
I am using ftp_pro.  How do I write a script to delete a file from my server either using ftp_pro or visual basic?
0
Question by:Saybrooke
    13 Comments
     

    Expert Comment

    by:namiths
    hey u can do it using the WININET.DLL  through visual basic .


    using this u can upload and download files and also delete the required file .
    0
     

    Author Comment

    by:Saybrooke
    I have not used this before.  I can I access the WININET.DLL?
    0
     
    LVL 8

    Expert Comment

    by:plq
    USE the dos command ftp <ipaddress>

    log in, and then use

         ls -al

    to list all files

    And I think its

         rm filename

    to delete
    0
     

    Author Comment

    by:Saybrooke
    The file I want to delete is on our remote FTP server and I do not know if I can get to our server using a dos command on my local pc.
    0
     
    LVL 8

    Expert Comment

    by:plq
    All you can do is give it a try. Just start a command prompt and type ftp, it will ask you for the rest
    0
     
    LVL 4

    Expert Comment

    by:Sicos

    Hi,

    Just use internet explorer to do the ftp'ing.

    Start IE and type "ftp://the pc you want to connect/"

    Greetings,
    Sicos
    0
     
    LVL 8

    Expert Comment

    by:plq
    .. and right click to login if the ftp site is secured (me no want points for that tip)
    0
     

    Author Comment

    by:Saybrooke
    I tried the ftp: suggestion and I was able to access the server.  I will try to use this in code and se if I can access the server.
    0
     
    LVL 19

    Accepted Solution

    by:
    See this page (http://www.thescarms.com/vbasic/inetftp.asp). It teaches you to use Inte control to do so.

    YOu just have to setup the things as given in the page and send a FTPRM command along with the file to delete it from the server.
    0
     
    LVL 4

    Assisted Solution

    by:Sicos
    0
     

    Author Comment

    by:Saybrooke
    I answered the question myself.  I created a site in ws_ftp_pro which contained password, id, ip address etc.  In script I wrote 4 lines of code:
    1.  Connect to to remote site
    2.  view path to ensure I was in the right place
    3. Delete all files *.*
    4.  Close procedure.

    I would like a refund as well as requesting you close this issue.
    0
     
    LVL 19

    Expert Comment

    by:RanjeetRain
    Can we see the script that solved your problem?
    0
     
    LVL 4

    Expert Comment

    by:Sicos
    hi,

    I did give a solution.

    Greetings,
    Sicos
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT Security CISA, CISSP & CISM Certification

    Master the advanced techniques required to protect network resources from external threats with the IT Cyber Security bundle. Built around industry best-practice guidelines, the IT Cyber Security bundle consists of three in-depth courses.

    Suggested Solutions

    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now