| Dart Home | PowerTCP FTP for ActiveX | Custom Development | Reply | PowerTCP FTP for ActiveX Topics | Forums |
| Author | Forum: PowerTCP FTP for ActiveX Topic: FTP Command method doing a cd |
| User725 Posts: 4 Member Since: 05/24/01 |
posted May 24, 2001 12:09 PM I am trying to change directory using this code mFtpCommand = "cd " & path & "/" & dirname FTP.Command mFtpCommand , mFTPrtncode response.write mFTPrtncode I don't even get a return code. Any ideas? Paul |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 24, 2001 12:44 PM cd is not an FTP command. I believe you mean "CWD" Hope this helps! Tony |
| User725 Posts: 4 Member Since: 05/24/01 |
posted May 24, 2001 2:02 PM Tried CWD mFtpCommand = "CWD " & path & "/" & dirname FTP.Command mFtpCommand , mFTPrtncode response.write "FTP return code " & mFTPrtncode &"<BR>" and I am still not getting a return code. Pau; |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 24, 2001 2:12 PM By any chance do you have On Error Resume next in your code? If so, remove it and the error will most likely be evident. Also, is mFTPrtncode dimmed? Did you set it to "" before passing it in? Tony |
| User725 Posts: 4 Member Since: 05/24/01 |
posted May 24, 2001 2:19 PM I tried with and without the On Error Resume Next, same result. Yes mFTPrtncode was DIMed. I have now assigned it a 0 length string as you suggested, nothing has changed. No return code is printed. Dim mFTPrtncode, mFtpCommand DIM mFTPrtncode mFTPrtncode = "" mFtpCommand = "CWD " & path & "/" & dirname FTP.Command mFtpCommand,mFTPrtncode Response.write "FTP return code " & mFTPrtncode & "<BR>" Paul |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 24, 2001 2:29 PM This works for me: <% Dim Ftp1 Response.Write "Creating FTP object ...<br>" Set Ftp1 = Server.CreateObject("Dart.Ftp") Dim replystr replystr = "" Response.Write "Logging in ...<br>" On Error Resume Next Ftp1.Login "ftp.netscape.com","anonymous","joeuser" If Err.number > 0 then Response.Write "ERROR: Login failed.<br>" Else Ftp1.Command "CWD /thisdir", replystr If Err.number > 0 then Response.Write "ERROR #" + cstr(Err.number) + ": " + Err.Description + "<br>" Response.Write "Reply = " + replystr + "<br>" Else Response.Write "CWD succeeded.<br>" End If End IF Response.Write "Test Complete.<br>" %> |
| User725 Posts: 4 Member Since: 05/24/01 |
posted May 24, 2001 3:07 PM Thanks for the help. I have some results now. Great support. Paul |
| Reply | PowerTCP FTP for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|