trying to make simple batch script
hey guys, I'm trying to make a batch script so that i can back up some files.
Pretty much I'm trying to make it so in the command line i type in the IP which is the source, the IP which is the destination , and then the folder i want everything copied and then the folder on the other IP i want it all to go in
sort of like:
transfer.bat 192.155.10.1 192.155.10.8 folder_drop folder_incoming
Im a bit rusty on my scripting and I've got this but I'm stuck
@ECHO OFF
if exist \\%1\Documents\%3\*.*
{
echo files exist
xcopy \\%1\Documents\%3 \\%2\Documents\%4 /E/V/C/I/R/Y
echo delete the files in the source
del \\%1\documents\%3\*.* /f/q
}
else
{
echo no files found
}
pretty much so it checks if the folder exists and it has files in it, then it copys and then deletes the files in the source folder, and if there arnt any files in the source folder it displays the no files found msg and quits