| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: Cannot list files in subdirectories |
| msisson msisson@firstam.com From: poway, CA USA Posts: 22 Member Since: 09/24/03 |
posted October 16, 2003 5:04 PM ** WE NOW HAVE A DOWN SYSTEM IN PRODUCTION DUE THE FOLLOWING PROBLEM ** The following C# code worked in our test environment but fails in production: Dart.PowerTCP.Ftp.Ftp ftp = new Dart.PowerTCP.Ftp.Ftp(); Dart.PowerTCP.Ftp.Listing list; ftp.Server = "XXX"; ftp.Username = "XXX"; ftp.Password = "XXX"; ftp.ServerPort = 21; ftp.DoEvents = false; ftp.Passive = false; ftp.Restart = false; ftp.Timeout = 30000; //30 second timeout list = ftp.List(@"output\*.man", true); The problem has to do with the backslash. In test we were going against a Microsoft W2k FTP Server and the backslash worked fine to find files in subdirectories. But our client is using something else (I've got a call in to find out his OS and FTP server) and this only works if we use a forward slash. So how am I supposed to use your component so that it works with all FTP servers? This is now a big problem because we do listings, deletes, and gets from several clients that could be running a variety of FTP servers. Please send me the "best-practices" use of your component so that I can be assured to LIST, DEL, and GET files from any FTP server using subdirectories. I've looked at your documentation but it is not very helpful on this topic. THX mark msisson@firstam.com |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 16, 2003 5:58 PM I would use a forward slash all the time. Microsoft will work with either, and as you have discovered UNIX doesn't like back slashes. |
| msisson msisson@firstam.com From: poway, CA USA Posts: 22 Member Since: 09/24/03 |
posted October 17, 2003 12:00 PM Can I be assured of this? I assume that you've worked with all the major FTP server out there. Is this a lock? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 17, 2003 12:04 PM Every FTP server I have ever used uses "/" for path designation. MS uses either "/" or "\". UNIX uses "\" as an escape character. The safest approach that I know of is to use "/" all the time. If you want to be "assured" I would test your app against all the FTP servers that you expect your customer to use. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|