RWFtpClient remote rename question

This is a discussion on RWFtpClient remote rename question within the C++ Programming forums, part of the General Programming Boards category; I'm using RWFtpClient to FTP some files...if any of you are familiar with it or any other FTP client software ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    RWFtpClient remote rename question

    I'm using RWFtpClient to FTP some files...if any of you are familiar with it or any other FTP client software in C++.

    My question is, I'm attempting to remote-rename some files. The documentation on RWFtpClient says to use a rnfr(), followed by a rnto(). The rnfr is "rename from" and rnto is "rename to" from what i can tell.

    When i do this:

    reply = client.rnfr(oldname);
    reply = client.rnto(newname);

    the file doesn't rename.

    Guys/gals, any suggestions?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,475
    Assuming you did a successful login with enough privileges, inspect the reply object. Answer to rnfr and rnto should be in the 3xx and 2xx range respectively.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    2
    oh ok
    looks like i was sending the name parameter as a char[] instead of what it should be, an RWCString.

    thanks for the tip

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  2. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 08:22 PM
  3. Rename file problem
    By Emporio in forum C Programming
    Replies: 2
    Last Post: 06-05-2002, 09:36 AM
  4. rename() problem
    By Dimeslime in forum C Programming
    Replies: 4
    Last Post: 02-09-2002, 04:38 PM
  5. Problem with cgi script - can't rename files
    By bjdea1 in forum C Programming
    Replies: 2
    Last Post: 12-12-2001, 03:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21