Upload same files to multiple FTP directories

Advertisement

drudkin
Guest

Upload same files to multiple FTP directories

I have a couple hundred files (local) that i need to upload to 63 different folders (FTP Server). Can i do this with one command or do i have to do each folder individually

Reply with quote

Advertisement

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

Re: Upload same files to multiple FTP directories

You have to use one command per directory.
But it's not that more complicated.
If you are uploading all files from the current working directory, you just prefix each folder with put *:
put * <folder1>
put * <folder2>
...

Reply with quote

drudkin
Guest

Re: Upload same files to multiple FTP directories

Thank you for the information, unfortunately i have no idea how to do that. I can place the commands in a text file, that is easy, but I have no idea how to run that script. Very new to SQL and automation like this. Any help you could give would be appreciated



martin wrote:

You have to use one command per directory.
But it's not that more complicated.
If you are uploading all files from the current working directory, you just prefix each folder with put *:
put * <folder1>
put * <folder2>
...

Reply with quote

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

Re: Upload same files to multiple FTP directories

drudkin wrote:

Thank you for the information, unfortunately i have no idea how to do that. I can place the commands in a text file, that is easy, but I have no idea how to run that script. Very new to SQL and automation like this. Any help you could give would be appreciated
Start here:
https://winscp.net/eng/docs/guide_automation

Reply with quote

drudkin
Guest

Upload same files to multiple FTP directories

Martin,
Thanks for pointing me in the right direction. I used the automated function to create the script file for me and then saved it as a text file, example of script below.
The only problem now is that i have no idea how to actually execute the script. I have read everything and I am sure that it is just something i am not understanding.
Your help is appreciated in advance
open sftp://drudkin:xxxxxxx@xxxxx.xxxxx.com/ -hostkey="ssh-rsa 1024 RO0ArzoIscQoMNpHvoyhKy/8EoRg+8GbkE4uKbBVooQ="

lcd C:\Users\drudkin\Documents\Zoom
cd /

put * <Advanced Air>
put * <Machine Specialties>
put * <Frey & Weiss>
put * <Alro Machine and Tool>
put * <Aerometals>
put * <Precision Mold and Tool>
put * <Forster Tool>
put * <Owens Industries>
put * <BLUSA>
put * <Alta Precision>
put * <International Precision>
put * <AAR LGS>
put * <Mayday Manufacturing>
put * <CM Manufacturing>
put * <Aero-Glen>
put * <Skyspares>
put * <Cummins Aerospace>
exit

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum