I need to upload zip files to an FTP server.
My first file looks like this:
sqlcmd -S .\SQLEXPRESS -U <user> -P <pass> -i c:\sql_script.sql
7za a -tzip %~dp0\Archive\Backup_daily_full.zip *.bak -v100m
For uploading a single file I created this:
@echo off
echo user {user}> ftpcmd.dat
echo {pass}>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat {server}
I don't know how many .zip files I will have after the backup and how to upload all of them on FTP (how to call that file within main .bat) OR how to simply upload them all at once.