PC Review


Reply
Thread Tools Rate Thread

comparing files

 
 
BrainDed
Guest
Posts: n/a
 
      8th Jul 2004
Here's a good one...

I've got two drives. One is the primary and the other is a backup. How would
I write a script to compare the contents of the two drives and delete the
files from the backup that have been deleted from the primary?

Thanks


 
Reply With Quote
 
 
 
 
Olaf Engelke [MVP]
Guest
Posts: n/a
 
      8th Jul 2004
Hi,
BrainDed wrote:
> I've got two drives. One is the primary and the other is a backup.
> How would I write a script to compare the contents of the two drives
> and delete the files from the backup that have been deleted from the
> primary?
>

create a backup script using Robocopy from resource kit with the /purge
option.
Best greetings from Germany
Olaf.

 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      8th Jul 2004
On Wed, 7 Jul 2004 22:35:26 -0400, "BrainDed" <(E-Mail Removed)>
wrote in microsoft.public.win2000.cmdprompt.admin:

>I've got two drives. One is the primary and the other is a backup. How would
>I write a script to compare the contents of the two drives and delete the
>files from the backup that have been deleted from the primary?


ROBOCOPY.EXE does that; see:
<http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en>

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
BrainDed
Guest
Posts: n/a
 
      8th Jul 2004
Thanks. Looks good but will it work with NT 4.0?


"Michael Bednarek" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 7 Jul 2004 22:35:26 -0400, "BrainDed" <(E-Mail Removed)>
> wrote in microsoft.public.win2000.cmdprompt.admin:
>
> >I've got two drives. One is the primary and the other is a backup. How

would
> >I write a script to compare the contents of the two drives and delete the
> >files from the backup that have been deleted from the primary?

>
> ROBOCOPY.EXE does that; see:
>

<http://www.microsoft.com/downloads/d...7a69-57ff-4ae7
-96ee-b18c4790cffd&DisplayLang=en>
>
> --
> Michael Bednarek http://mbednarek.com/ "POST NO BILLS"



 
Reply With Quote
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      8th Jul 2004
BrainDed wrote:

> Thanks. Looks good but will it work with NT 4.0?

Hi

Should work OK on Win2k and WinNT4 as well, from the note part in rktools.chm:

<quote>
This version of RoboCopy was developed and tested under Microsoft Windows XP.
The recommended minimum operating system platform for this version of RoboCopy
is, therefore, Microsoft Windows XP or Microsoft Windows Server 2003.

RoboCopy uses only standard, publicly documented Win32 application programming
interfaces (APIs)s throughout. For example, the program uses CopyFileEx() to
copy files, and FindFirstFile() and FindNextFile() to read directories. In
theory, RoboCopy should run on any operating system that supports these APIs,
such as Windows NT version 4.0 and Windows 2000. However, if you run this
version of RoboCopy on Windows NT version 4.0 or Windows 2000, be aware that
only limited testing has been performed on these platforms. The theoretical
performance of RoboCopy might differ from practical results.

Because RoboCopy uses the CopyFileEx() Win32 API, it cannot run on Windows NT
3.1, Windows NT 3.5x, Windows 95, Windows 98, or Windows Millennium Edition.
</quote>


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/com...r/default.mspx
 
Reply With Quote
 
Olaf Engelke [MVP]
Guest
Posts: n/a
 
      8th Jul 2004
BrainDed wrote:
> Thanks. Looks good but will it work with NT 4.0?
>

yes - it's also part of the NR Resourcekit.
Best greetings from Germany
Olaf.
 
Reply With Quote
 
Ray McCormick
Guest
Posts: n/a
 
      8th Jul 2004
Alternatively use Xxcopy. This is extremely versatile and free
for single computer use.

Ray

"BrainDed" <(E-Mail Removed)> wrote in message
news:-(E-Mail Removed)...
> Here's a good one...
>
> I've got two drives. One is the primary and the other is a

backup. How would
> I write a script to compare the contents of the two drives and

delete the
> files from the backup that have been deleted from the primary?
>
> Thanks
>
>



 
Reply With Quote
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      8th Jul 2004
Olaf Engelke [MVP] wrote:

> BrainDed wrote:
>
>>Thanks. Looks good but will it work with NT 4.0?
>>

>
> yes - it's also part of the NR Resourcekit.


only that the version in the Win2k3 RK is a newer version (see my
other post for a compatibility note).


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/com...r/default.mspx
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing 2 MSG files . =?Utf-8?B?cGVrZXRp?= Microsoft Outlook VBA Programming 7 17th Feb 2006 05:51 AM
Comparing Files in W2K ? Magnusfarce Microsoft Windows 2000 3 29th Jul 2005 04:53 PM
comparing two files Leo Kerner Windows XP General 3 11th Mar 2005 06:34 AM
Comparing XML Files Mark Jerde Microsoft C# .NET 2 10th Mar 2005 12:39 AM
Comparing Files KNorman Microsoft Dot NET 1 6th Aug 2003 08:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:12 AM.