How to send a directory folder to FTP

Advertisement

grahamjansen
Joined:
Posts:
1
Location:
South Africa

How to send a directory folder to FTP

Hi Forum
Please can you assist, I need to send a directory (folder) frough to FTP site using WinSCP script, but not the contents of the directory.

My script that I use has the following:
option batch abort
option confirm off
open "ftp://username:password@x.x.x.x"
put C:\testftp\*
close
exit
This script copies the contents of the C:\testftp directory, I want to send the testftp directory only.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
36,205
Location:
Prague, Czechia

Re: How to send a directory folder to FTP

I do not understand, what you mean by to send directory, but not its contents.

Do you want to create an empty directory on the server? For that use mkdir command:
mkdir C:\testftp
https://winscp.net/eng/docs/scriptcommand_mkdir

Or do you want to upload the files from the directory, but not its the subdirectories?
https://winscp.net/eng/docs/faq_script_non_recursive

Reply with quote

Advertisement

You can post new topics in this forum