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: Directory method
vinny
vince@coppolamyer.com

From: Forestville, NY USA
Posts: 23
Member Since: 08/07/00
posted July 18, 2001 7:54 PM

dFTP is the Dart control
FileList is a string containing a folder name in the current directory.
ListFiles is a Sub that does dFTP.List
Message is a label
RemDir is a text box

If I run this to go into a folder:
  dFTP.Command "CWD " & FileList, Reply
  ListFiles
  Message.Caption = Reply
  RemDir = dFTP.Directory

The directory does change, I can see its contents in my listbox, but RemDir gets set to the .../hdocs

If I run this to go up:
 dFTP.ChangeDirectoryUp
 ListFiles
 RemDir = dFTP.Directory
the diectory changes and RemDir gets the proper directory.

I don't see why .Directory should not always return the active directory.

Vince

K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 19, 2001 9:42 AM


Hi Vince,
You're right. According to the Help File, this Property is set under three conditions: During Login, during CDUP, and when the Property is explicitly set. The control sends a PWD to get the data to set this property. Under any other conditions, the server is not queried, and the Property is not changed.
Knowing this, I tried using the Command method to send a PWD after the CWD, but the Property was still not changed.
If possible, I would change directories using the Directory property, instead of using Command to send a CWD. Or, if you must use the Command method, use the Result parameter as an indicator of the current directory.
-ken

K M Drake
Dart Tech Support

vinny
vince@coppolamyer.com

From: Forestville, NY USA
Posts: 23
Member Since: 08/07/00
posted July 24, 2001 7:45 PM

OK, I reworked my code to set the directory property and all is well. Thank you,
Vince
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX