Moving files by FTP

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
RMSoares
Posts: 32
Joined: 06 Aug 2012 12:01

Moving files by FTP

#1 Post by RMSoares » 29 Aug 2012 09:40

Hi,
we are using the ftp to get same files to work, after we process this files we need to move this files to a remote directory in the same server where we the the files by ftp.

We are using the mget to extract all files.


(
echo open %2
echo %3
echo %4
echo cd %5
echo binary
echo mget FSeq_001_IN_*.dat
echo disconnect
echo bye
)>PROC_GET_Card_ftp


ftp -i -s:PROC_GET_Card_ftp
del PROC_GET_Card_ftp

How can we move all files from %5 to %5/backup ?

e4nd
Posts: 12
Joined: 17 Mar 2012 02:28

Re: Moving files by FTP

#2 Post by e4nd » 29 Aug 2012 13:00

http://www.webcom.com/help/ftp/rename.shtml

@echo off
::
set host=
set user=
set pass=
::
(
echo user %user% %pass%
echo cd %5
echo mget FSeq_001_IN_*.dat
echo rename *.dat backup/*.dat
echo disconnect
echo quit
)>> "ftp.txt"
::
ftp -n -s:ftp.txt %host%
::
if exist ftp.txt del ftp.txt
pause>nul

Post Reply