|
Answer» Hello,
I've made a BATCH file to copy some files/folders from one PC to another, but it's stopping unexpectedely in the middle of the process.
Here's the code:
---
@echo off echo Hello, Welcome to your Backup WIZARD! :escolha echo Choose your OPTION: echo 1 - LAN echo 2 - VPN set /p x= if "%x%"=="1" goto lan if "%x%"=="2" goto vpn cls echo This option doesn't exist. goto escolha
:lan xcopy C:\"Documents and Settings" \\Ibmservidor\Folder /S goto end
:vpn xcopy C:\"Documents and Settings" \\[VPN IP]\Folder /S goto end
:end
--
Do you guys know what could cause this problem and/or how could I fix it?
Thanks! Domingos
---
EDIT: I put a "pause"at the end of the code. It's not really stopping unexpectedly, it's just not coping everything: a folder with 250 MB was completely COPIED with 215MB.If it encounters an error at some stage it will display the error message and then exit. If you run it from cmd it should come back to cmd when the error occurs and you can read off the error message.
FBHun. It's not really an *error*, as I said in the edit line in the first post.
Sorry for the confusion =/ !What's it leaving out? presumably you know that the /s switch means it's not going to copy empty files...?
|