[539] in winnt
Re: scripting, copying, WinAt
daemon@ATHENA.MIT.EDU (Bryant C. Vernon)
Mon Sep 11 15:05:09 2000
Message-ID: <39BD2CDE.334A3CF4@mit.edu>
Date: Mon, 11 Sep 2000 15:05:02 -0400
From: "Bryant C. Vernon" <bcvernon@MIT.EDU>
MIME-Version: 1.0
To: Dave Broderick <djbroder@mit.edu>
CC: ntpartners@mit.edu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi Dave,
What do you get when you type "at" at the command prompt--are any jobs scheduled--are there any errors? Also, you may want to add these lines to the bottom of your code...
date /T >> \\Audio-visual-4\DBBackup\FMBackup\backup-log.txt
time /T >> \\Audio-visual-4\DBBackup\FMBackup\backup-log.txt
ECHO The DBbackup successfully ran! >> \\Audio-visual-4\DBBackup\FMBackup\backup-log.txt
ECHO ------------------------------------------------------------- >> \\Audio-visual-4\DBBackup\FMBackup\backup-log.txt
That way you can quickly check this log to ensure that your script did in fact run (whether or not it copied the files is another matter though).
I look forward to hearing back from you!
Bryant
P.S. If you want to be extremely thorough, you can even record which files copied. You can do so by appending the following after your xcopy command:
> \\Audio-visual-4\DBBackup\FMBackup\backed-up-file-list.txt
That gives you:
xcopy /ED D:\FMBackup\*.fp3 \\Audio-visual-4\DBBackup\FMBackup > \\Audio-visual-4\DBBackup\FMBackup\backed-up-file-list.txt
Also, I usually split switches with the / character--i.e. /e to copy subdirectories (even empty ones) and /d to only copy files that are newer than the destination files. I do so because some commands do not accept merged switches (i.e. dir) and because I want to
make sure that it is clear that each switch has a special function.
Dave Broderick wrote:
> I'm trying to backup files by scheduling a nightly copy of files from one computer to another.
>
> I already run a similar script which copies files (using Xcopy) from one logical drive to another on the same machine. This script works fine.
>
> However, the following script does not work: (actually it's more complex than that)
> -------------------------
> @echo on
> rem Backup To Lou
>
> rem Created for MIT Audio Visual on 9/6/2000
> rem by Dave Broderick
> rem Backup To Lou.CMD
>
> xcopy /ED D:\FMBackup\*.fp3 \\Audio-visual-4\DBBackup\FMBackup
> --------------------------
>
> Actually, the above script does work when I double click on it. However, when I tell the scheduler to do it, it fails, and the scheduler (WinAt is just a GUI to the scheduler) doesn't tell me why. The task just goes away and the destination folder remains empty.
>
> duh?
>
> Thanks for any help
>
> David J. Broderick
> djbroder@mit.edu
> Senior Audio Visual Specialist
> MIT AV 617 253 2808
> FAX 617 253 5945
> http://web.mit.edu/djbroder/www