Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: File Transfer Help

05 Mar 2015   #1
born2achieve

windows7 64 bit
 
 
File Transfer Help

hi,

I have two FTP servers namely SampleFTP1(public FTP) and SampleFTP2 (private FTP)

Both are SFTP enabled. Lets take an example, I need to copy the text file from SampleFTP1 path C:/TestData/Test.txt and wanted to transfer to SampleFTP2 path /InputFile/Test.txt. Right now i am suing filezilla to do this as manual process. Is there any where i can automate this process by using batch script. Any example will be very helpful for me to proceed. please help me on this


My System SpecsSystem Spec
.
06 Mar 2015   #2
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Hey there,

FTP-ing can be done in batch.

Here's some sample script,

Code:
@echo off

REM Paths and file names may or may not be case sensitive!

set server_1_to_connect_to=11.11.11.11
set Username=Username
set Password=Password
set server_1_path=/TestData
set file_to_download=Test.txt

set server_2_to_connect_to=22.22.22.22
set Username=Username
set Password=Password
set server_2_path=/InputFile
set file_to_upload=%FILE_TO_DOWNLOAD%
::
set local_path=%TEMP%

::: Download %server_1_path%/%file_to_download% to %local_path%
	(
		echo.%USERNAME%
		echo.%PASSWORD%
		echo.lcd %TEMP%
		echo.cd %SERVER_1_PATH%
		echo.binary
		echo.get %FILE_TO_DOWNLOAD%
		echo.bye
	) > "%TEMP%\_%~n0.ftp"
	ftp -s:"%TEMP%\_%~n0.ftp" %SERVER_1_TO_CONNECT_TO%
	del "%TEMP%\_%~n0.ftp"
:::

::: Upload %local_path%\%file_to_upload% to %server_2_path%
	(
		echo.%USERNAME%
		echo.%PASSWORD%
		echo.lcd %TEMP%
		echo.cd %SERVER_2_PATH%
		echo.binary
		echo.put %SERVER_FILE_TO_DOWNLOAD%
		echo.bye
	) > "%TEMP%\_%~n0.ftp"
	ftp -s:"%TEMP%\_%~n0.ftp" %SERVER_2_TO_CONNECT_TO%
	del "%TEMP%\_%~n0.ftp"
:::

del %LOCAL_PATH%\%SERVER_FILE_TO_DOWNLOAD%
It may take some fiddling around with to get it to work.
My System SpecsSystem Spec
Reply

 File Transfer Help




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
file transfer
I have a 64 bit windows home prem. 7 dell laptop and want to transfer these files to a dell pc running windows pro 7 32 bit can it be done and if so how
General Discussion
file transfer
hi folks i am wondering how i might be able to download a picture from my windows 7 laptop to my samsung gt-s3550 mobile phone or download a picture a picture to my fujifilm finepix z digital camera i have tried everything to find and activate bluetooth but without success so i would be greatly...
Hardware & Devices
File Transfer
Hi Have just purchased a higher spec laptop both laptops running Windows 7 Home, which in users experience is the best method for transferring data from old (32)to the new (64), External hard drive, Easy transfer cable etc? Also I have Microsoft office 2007 will this be able to be...
Hardware & Devices
file transfer
I wish to transfer large files from my main hd to a usb storage drive. With Win 7, I must use the copy function which takes much longer than I expected. I have a SATA II hd. Do I require a RAID setup for faster file transfers? How about an Easy Data Cable? I am considering the purchase of an...
General Discussion
File Transfer from XP to Windows 7
I recently backed up my files from my last computer which was running windows xp onto an external hard drive using the files and settings transfer wizard. The files were compressed onto my hard drive as .dat files. Now, when I attempt to restore the files onto my new computer running windows 7,...
Backup and Restore
File transfer
:confused:Hi, Its taken about 10 minutes to send a file (4.9Gb) from My Doc's to an external drive, now its never been as slow. but even small files are takeing longer than usual! What could be happening?:o
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 15:01.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App