Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP command not understood

Status
Not open for further replies.

DarwinIT

Programmer
Apr 25, 2008
142
US
I was just given a project to pull in some files via FTP and import the data to a database. The files comes from two sources. The first source went off without a hitch. I figured the 2nd phase would be a piece of cake. Instead it was a big slab of brick wall. In order to make sure all worked OK, I ran FTP from the command shell (I still call it DOS). I was able to login, change the directory with cd and then issue a dir command to get a list of the files. However when I issue a cd or a dir command from the C# application using NetworkStream and TCPClient - I'm getting a 500 error - CD not understood and 500 DIR not understood. Anyone have a clue why this works differently in the C# app then in a direct FTP session?
 
Problem resolved. CWD and NLST do work on this server from the application. CD and DIR do not. I don't understand that - but it doesn't matter now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top