Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

script to copy current files from one folder to another and to FTP it to a another server

$
0
0

I have created a simple script that copies the file, but doesn't give me only the current day file.  I'm not sure what I'm doing wrong.

:: @echo off

setlocal

:: Checking for production cluster

if not exist e: exit

date /t

for /f "tokens=1-4 delims=/ " %%A in ('date /t') do (

   set M=%%B

   set D=%%C

   set Y=%%D)

xcopy E:\ACHDlrPPcsvDownload\*-%Y%%M%%D%*-GMACTEST.csv /y E:\ACHDLRCSV

pause

endlocal

I also want to ftp this file to another server. I've tried the basic FTP command but it doesn't work.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>