Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question re: how to copy file to ftp directory
#1
Still going at it -- addictive stuff, QM.

I promise I'll get some sleep after this one...

In the same "module" as my post "Please Help: elected file" etc., after copying (and renaming at the same time) the file to local upload directory, I need to upload that same file to an FTP directory.

I tried to use the FTPUpload function (by force-specifying a local file, and changing the arguments to my proper FTP url, username, password. The process runs, returns no errors, says "FTP session has ended", yet no file has been copied to the FTP site directory. I tried commenting out the pw encryption declaration and changed the "pw" to "mypassword" I tried different "ftpdir"s and all manner of formatting the ftpdir variable.

In order to get beyond this spot, I used NetDrive to assign the ftp site to drive X like such:

Code:
Copy      Help
cop "C:\test.txt" "X:\web\nxxxx.org\mediafiles\test2.txt"

NetDrive works fine for now, tho I'd rather have it built in and not relying on having NetDrive istalled.

I also tried using the cop function with the standard "ftp://username:[email protected]/ftpdir/" format (which worked perfectly well in IE, 2xplorer etc. address bar).

ISSUE: copy local file zz (string/variable) to remote ftp server (I don't need to browse for files at all, just copy from str zz to the FTP directory. Can I do this within the macro code?

Here's the preceeding code before file can be uploaded, all working fine...

Code:
Copy      Help
zz.from("C:\murFTP\upload\" t "_" u m)
,,
str s
,if(BrowseForFolder(s "c:\murFTP\" 1 "Select File"))
,,
,,if mes("You Are about to rename and copy file to upload directory." "Proceed?" "OC1t")='O'
,,,cop s zz


Any help is surely appreciated...thanks again!

Steve


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)