Your technology certification is waiting. Enroll in Cloud Class ®
rem 1 - Check availability
ping -n 1 <ftp server> >nul 2>nul
if %ERRORLEVEL% NEQ 0 goto FTP_UNAV
rem 2 - Check file readiness
rem TBD - see question above
rem 3 - FTP file
winscp.exe /console /script=ftpscript.txt
if %ERRORLEVEL% NEQ 0 goto FTP_ERROR
echo FTP sending OK >> ftplog.txt
move <orig folder>\<file> <archive folder>/
echo FTP error sending file >> ftplog.txt
echo File not ready >> ftplog.txt
echo FTP server unavailable >> ftplog.txt
Open in new window
This course teaches how to install and configure Windows Server 2012 R2. It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).
ping <ftp server>
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.