Deleting a distant file by FTP protocol

  • Hello,

    I am not specialist in networks, it's why the following question.

    The context is a Cocoa app MacOS Tiger.
    Can somebody help me to find an API, a function or a method that I
    can use to delete a file through the FTP protocol.
    I am able to list content of distant folders, to transfer files with
    the CoreService framework by using CFFTPStream.h interface, but I am
    not able to find any interface in order to delete a particular file
    for which I know the url... And I need to do it with the FTP protocol.

    Some idea ? Thank's in advance.

    Luc Regnault
    Alwan Color Expertise
    Research & Development
    <luc...>
    http://www.alwancolor.com/
    http://regnault.luc.free.fr/
  • Luc - If you're using FTP to list and transfer files, you would of
    course use the "DELE" command (see http://www.nsftools.com/tips/
    RawFTP.htm for a list of raw commands).

      If you are only planning on using FTP to remove the file (ie,
    you're using another approach to list / transfer files), then search
    this list's archives for "FTP":

    http://www.cocoabuilder.com/search/archive/cocoa?words=FTP

      ... there are a number of threads about this subject already.

      I hope this helps.

    --
    I.S.

    On Oct 5, 2006, at 10:31 AM, Luc Regnault wrote:

    > Hello,
    >
    > I am not specialist in networks, it's why the following question.
    >
    > The context is a Cocoa app MacOS Tiger.
    > Can somebody help me to find an API, a function or a method that I
    > can use to delete a file through the FTP protocol.
    > I am able to list content of distant folders, to transfer files
    > with the CoreService framework by using CFFTPStream.h interface,
    > but I am not able to find any interface in order to delete a
    > particular file for which I know the url... And I need to do it
    > with the FTP protocol.
    >
    > Some idea ? Thank's in advance.
    >
    > Luc Regnault
    > Alwan Color Expertise
    > Research & Development
    > <luc...>
    > http://www.alwancolor.com/
    > http://regnault.luc.free.fr/
    >
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • Actually, a slight correction on my previous statement - the
    CocoaBuilder site maintains an archive of this list (the macosx-dev
    list) and Apple's cocoa-dev list.

    --
    I.S.

    On Oct 5, 2006, at 10:31 AM, Luc Regnault wrote:

    > Hello,
    >
    > I am not specialist in networks, it's why the following question.
    >
    > The context is a Cocoa app MacOS Tiger.
    > Can somebody help me to find an API, a function or a method that I
    > can use to delete a file through the FTP protocol.
    > I am able to list content of distant folders, to transfer files
    > with the CoreService framework by using CFFTPStream.h interface,
    > but I am not able to find any interface in order to delete a
    > particular file for which I know the url... And I need to do it
    > with the FTP protocol.
    >
    > Some idea ? Thank's in advance.
    >
    > Luc Regnault
    > Alwan Color Expertise
    > Research & Development
    > <luc...>
    > http://www.alwancolor.com/
    > http://regnault.luc.free.fr/
    >
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • I.S,

    Thank you for your proposal. But FTP is a command tool, and I don't
    want to use it from my app. It's something not very easy to manage
    through NSTask. I really search for a function or a method API.

    To list and transfer files I use actually the API  CFFTPStream.h of
    CoreService framework. But I haven't found anything inside it to
    delete a remote file.

    Luc.

    Le 5 oct. 06 à 17:07, I. Savant a écrit :

    >
    > Luc - If you're using FTP to list and transfer files, you would
    > of course use the "DELE" command (see http://www.nsftools.com/tips/
    > RawFTP.htm for a list of raw commands).
    >
    > If you are only planning on using FTP to remove the file (ie,
    > you're using another approach to list / transfer files), then
    > search this list's archives for "FTP":
    >
    > http://www.cocoabuilder.com/search/archive/cocoa?words=FTP
    >
    > ... there are a number of threads about this subject already.
    >
    > I hope this helps.
    >
    > --
    > I.S.
    >
    >
    > On Oct 5, 2006, at 10:31 AM, Luc Regnault wrote:
    >
    >> Hello,
    >>
    >> I am not specialist in networks, it's why the following question.
    >>
    >> The context is a Cocoa app MacOS Tiger.
    >> Can somebody help me to find an API, a function or a method that I
    >> can use to delete a file through the FTP protocol.
    >> I am able to list content of distant folders, to transfer files
    >> with the CoreService framework by using CFFTPStream.h interface,
    >> but I am not able to find any interface in order to delete a
    >> particular file for which I know the url... And I need to do it
    >> with the FTP protocol.
    >>
    >> Some idea ? Thank's in advance.
    >>
    >> Luc Regnault
    >> Alwan Color Expertise
    >> Research & Development
    >> <luc...>
    >> http://www.alwancolor.com/
    >> http://regnault.luc.free.fr/
    >>
    >>
    >> _______________________________________________
    >> MacOSX-dev mailing list
    >> <MacOSX-dev...>
    >> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
  • On Oct 5, 2006, at 11:19 AM, Luc Regnault wrote:
    > Thank you for your proposal. But FTP is a command tool, and I don't
    > want to use it from my app. It's something not very easy to manage
    > through NSTask. I really search for a function or a method API.

      You asked, "Can somebody help me to find an API, a function or a
    method that I can use to delete a file through the FTP protocol."

      I didn't say you had to use the ftp command line tool via NSTask;
    if you followed the link I provided, there are a number of
    alternative suggestions (third party frameworks both free and
    commercial) in addition to 'bossing ftp around' with NSTask.

      The bottom line is that there is no ready-to-go API built into OS
    X for easily saying "delete this file at this path on this server via
    FTP", so the only alternatives to building your own solution from
    scratch are to use the command line tool or a third-party framework.

    --
    I.S.
  • I.S.,

    I have just found a source project on SourceForge.net. The name is
    "FTPClient" and it looks fine. It gives me an objective C source
    solution of what could be an FTPClient object. Very nice. I think it
    will be my solution.

    Luc.

    Le 5 oct. 06 à 17:08, I. Savant a écrit :

    >
    > Actually, a slight correction on my previous statement - the
    > CocoaBuilder site maintains an archive of this list (the macosx-dev
    > list) and Apple's cocoa-dev list.
    >
    > --
    > I.S.
  • I.S.,

    > I didn't say you had to use the ftp command line tool via NSTask;
    > if you followed the link I provided, there are a number of
    > alternative suggestions (third party frameworks both free and
    > commercial) in addition to 'bossing ftp around' with NSTask.

    Yes, you are right. I have made a shortcut. Sorry about it.

    > The bottom line is that there is no ready-to-go API built into OS X
    > for easily saying "delete this file at this path on this server via
    > FTP", so the only alternatives to building your own solution from
    > scratch are to use the command line tool or a third-party framework.

    Yes, I agree and that is my problem. It's not easy to build a
    solution from scratch if you are not a network layer expert.
    I like what you said:
    "delete this file at this path on this server via FTP"
    That's really what I want to do. But There no direct way to do it.

    Thanks a lot for your time. Regards, Luc.

    Luc Regnault
    Alwan Color Expertise
    Research & Development
    <luc...>
    http://www.alwancolor.com/
    http://regnault.luc.free.fr/
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today