0

I have to copy file from one FTP location to other FTP location ? can i do it using shell script ?

I have tried this

But for this i have to excute the script as source location

Copy files from once linux system to other

scp source folder  username@hostname:destination

Eg

scp /ep-data/pcats/20130122/50201/20130122200900085_97_101_28/upload/* pcats@xxx.com:/home/pcats/Tay_Fra
tharani dharan
  • 425
  • 3
  • 8
  • 18
  • What is the problem you are having? – oberlies Apr 03 '14 at 11:54
  • The ftp protocol permits you to open a control connection (port 21) to ftp1:21 and another control connection to ftp2:21 through your client. Over the control connection you can ask ftp1 to send a file directly to ftp2, without passing through your client. Data is passed over port 20. I think the question is, How can I pass a file from ftp1 to ftp2, without downloading the file to my current computer! -- THIS IS NOT A DUPLICATE QUESTION -- – Hasse Björk Oct 19 '16 at 21:13

1 Answers1

0

What's wrong with scp for this purpose? If you're looking to download the file to your own computer and upload it again you can still use scp. If you need it to work on Windows you can use PSCP .

Colin Pickard
  • 45,724
  • 13
  • 98
  • 148
  • My requirement is to upload files one by one from 1st FTP to 2nd FTP(connect and disconnect after each file is transferred) Using Shell script. – tharani dharan May 09 '13 at 10:54