Check if file exists on FTP-server

Hello

I want to check if a file exists on a FTP server, but I have no clue how I can begin with this.

I tried this method:
http://www.example-code.com/vcpp/ftp_fileExists.asp
But for that I again need an extra library, which I don't want.

In my project I'm using the SFML Library, someone suggested me the 'DirectoryListing'-method:
http://www.sfml-dev.org/documentation/2.0/classsf_1_1Ftp_1_1ListingResponse.php
http://www.sfml-dev.org/tutorials/2.0/network-ftp.php

But that code didn't worked, I don't understand it, and I don't know what vectors are.

Someone knows how to check if a file exists on a FTP-server? With or without SFML?

Thanks for reading,
Niely
Someone able to help? :/
Similar to the code in the first link of your post, where if checking for the file size fails the file doesn't exist, you could use sf::Ftp::renameFile(). Pass the file name you are checking for as both parameters and test response.isOk().
^Thanks, that worked awesome and exactly what I needed. :)
Topic archived. No new replies allowed.