Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: Detect if directory exists...
e-roq

From: Mentone, CA USA
Posts: 18
Member Since: 09/27/03
posted August 19, 2004 6:16 AM

Hello Friends,

I am using the FTP activex tool and I am wanting to see if a directory exists before I upload a file. I am not using a GUI. I have been using the List property just fine and getting positive results but I am wondering if there is a more "direct" approach without having to enumerate though all the files and dirs first before discovering there is or is not a directory I need.

Thanks for any help. :)
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted August 19, 2004 7:25 AM

Try to set the working directory to the directory you want. If it works, it's there. If you get an error, it's not.
rtiint

From: Durham, NC USA
Posts: 4
Member Since: 07/25/06
posted July 25, 2006 4:57 PM

This is exactly what I tried to do. I'm using Secure FTP for .NET, and I'm brand new to your product so please excuse a newbie question. When I call GetDirectory() I get "the requested address is not valid in its context". I suspect I'm not logged in. If I do a put first, it works. How do I get it to connect so I can do operations such as GetDirectory(), without first calling get or put (barring using RawConnect).

p.s. The product is working great for everything else. I'm wrapping the component in c# and exposing it via interop for use in a legacy VB6 app, until the legacy app can be replaced with a dot net version.
rtiint

From: Durham, NC USA
Posts: 4
Member Since: 07/25/06
posted July 26, 2006 7:56 AM

Never mind. I figured out what I did wrong.
Mike Baldwin (Admin)



From: Rome, NY USA
Posts: 114
Member Since: 04/11/00

Extra Support Options
Custom Application Development

posted July 30, 2006 9:53 PM

Hey,

For the benefit of our forum users, would you tell us what technique you were using that didn't work for you?
rtiint

From: Durham, NC USA
Posts: 4
Member Since: 07/25/06
posted July 31, 2006 9:09 AM

It was just a dumb mistake. In my other operations, adapted from the samples, I called a function like SetProperties() to set the control's server, host, etc. I forgot to do that before calling GetDirectory, so of course it couldn't connect.
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX