Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to FTP, written code to upload and download file which is already present on server folder. But now I am stuck with create new files on server folder.
Any suggesion will be appreciate. Tried below method but no effect.

What I have tried:

ftpreq.Method  = WebRequestMethods.Ftp.MakeDirectory;
Posted
Comments
Jochen Arndt 15-Dec-17 7:21am    
If you can already upload even when the file exists already on the server, you can also upload a new file. There is no difference (both uses the FTP STOR command).

Your code snippet is creating a directory, not a file.

If you just want to create any file:
There is no such FTP command. A file is created when uploading and a file with that name does not exist yet.
Member 11543226 15-Dec-17 23:22pm    
I tried uploading file with name 1.csv but this is not present on server folder so got error 550 file not found
Karthik_Mahalingam 27-Dec-17 23:39pm    
use  Reply  button, to post Comments/query to the user, so that the user gets notified and responds to your text.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900