Changing remote directory

Advertisement

ck_ck_ck_ck
Joined:
Posts:
1

Changing remote directory

I'm trying to upload csv files to a remote directory via script.

The home directory for the FTP site I'm connecting to is: E:\ftp\out\test\files
I only have permissions to write to E:\ftp\in\test\files\. Is my script below correct? It's failing and I can't figure out if it's my script or a permissions issue on the target folder.

Here is my script:
option batch continue
option confirm off
open ftp://username:password@ftp.site.org/
lcd C:\localdirectory\Validation\
put *.csv E:\ftp\in\test\files\
exit
Thank you

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,286
Location:
Prague, Czechia

Re: Changing remote directory

"It's failing" is not very useful problem description.
Anyway, the E:\ftp\in\test\files\ looks like a physical path on the remote server valid on the server only. Not FTP path exposed to the world. That will more be like /files/ or /test/files. Login with GUI and see yourself, what is the actual FTP path syntax of your server like.
See also https://winscp.net/eng/docs/faq_script_vs_gui#paths
If this does not help, post a session log file of a successful upload from WinSCP GUI.

Reply with quote

Advertisement

You can post new topics in this forum