automated ftp files upload and download with a message box
Posted on 2012-09-19
I am looking for a vbscript that can prompt the user for a file to download and once entered download that file. Also, the same thing except put a file on a server through ftp. I have this batch file but it does not pop a message that the file was transferred.
REM Prompt user for file name
set /P File=Please enter filename to transfer:
if "%File%" EQU "" (
echo ERROR - No filename specified.
REM FTP file
echo open 10.10.10.21
echo user user
echo lcd c:\temp
echo cd /home/user
echo get %File%
) | ftp -n -i
With this ftp file I can store the username and password and have it prompt for a file name or store the file name. I am looking for the same thing in vbscript except when the file transfers have a message box say "Transfer complete" or if the file fails say "Transfer Failed".