ftp batch file rename if already exists
Posted: 06 Apr 2015 14:49
so im making a batch file that automatically uploads files from my directory on my computer to my website ftp. it does fine on the upload part but i want it to be able to rename files automatically if they already exist. is there a way to do that? this is what i have so far...
i need it to automatically rename the files and keep the old ones.
Code: Select all
@echo off
echo user b7_16073680> ftpcmd.dat
echo mypass>> ftpcmd.dat
echo cd /htdocs/>>ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.byethost7.com
del ftpcmd.dat
i need it to automatically rename the files and keep the old ones.