jonathanduane2010
asked on
auto ftp and vbs script
Hello there, i was wondering if anybody could help me out with the following, i am looking for a vb script that will auto ftp all mp3 in a folder and then purge the files after it has ftp'd them?
thanks
thanks
Nevermind...I thought that was a link to a utility I used a while ago.
Different link.
Different link.
If you want to stick with the core FTP utility in Windows, then something like this should work:
http://www.ncftp.com/ncftp/
~bp
@echo off
pushd "C:\MP3"
REM Do FTP transfer
(
echo open hostname
echo username
echo password
echo mput *.mp3
echo bye
)|ftp
REM Delete MP3 files
del /Q *.mp3
popd
But personally I would use a more robust tool like NCFTPPUT, which can do the xfer and aslo delete the files after a successful transfer, all from a single command line. Check it out at:http://www.ncftp.com/ncftp/
~bp
ASKER
ok i have tried that and it deletes the file but doesnt actually upload the file
i have this at the moment
@echo off
pushd "C:\MP3"
REM Do FTP transfer
(
echo open 213.146.144.194/news/jonat han
echo username
echo password
echo mput *.mp3
echo bye
)|ftp
REM Delete MP3 files
del /Q *.mp3
popd
i have this at the moment
@echo off
pushd "C:\MP3"
REM Do FTP transfer
(
echo open 213.146.144.194/news/jonat
echo username
echo password
echo mput *.mp3
echo bye
)|ftp
REM Delete MP3 files
del /Q *.mp3
popd
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you get any errors to the screen from the FTP xfer.
~bp
~bp
http://support.microsoft.com/kb/238273
...then simply clear the folder...
DEL c:\yourfolder\*.mp3 /Q