Comparing 2 folders

  • Thread starter Thread starter Evi
  • Start date Start date
E

Evi

I back my files from one folder onto a CD. The folder on my hard drive has
several subfolders. What is the simplest way to find out which files in the
folder haven't yet been backed up on the CD (ie which ones have a newer
'Modified' date than the ones on the CD)?
Evi
 
Evi said:
I back my files from one folder onto a CD. The folder on my hard drive has
several subfolders. What is the simplest way to find out which files in the
folder haven't yet been backed up on the CD (ie which ones have a newer
'Modified' date than the ones on the CD)?
Evi

If your CD is configured to behave like a floppy disk then
you can use a "smart" backup process:

xcopy /s /d /c "c:\My Documents\*.doc" "E:\My Documents"

Start a Command Prompt and type this command:

xcopy /?

to see the meaning of the various switches. In your case, the /d
switch is important.
 
That is what Backup programs do for you.....
They change the Archive bit (or not) and react accordingly depending on
whether you are doing a Full, Differential or Incremental backup.
The files that have not been copied will have the archive bit turned on
if the last backup was Full or Incremental but not if it was
Differential.
It is doubtful whether you have a true Backup as very few backup
programs will backup to CD's.
So the answer to your question should be look at the Archive bit on the
file and its nothing to do with modified date except in relation to the
last backup date, its all to do with the archive bit.
If you are in fact copying files to the CD you can change the archive
bit (or not) if you use Xcopy.

(e-mail address removed))
URL http://www.canalbs.co.uk/

Troubleshooting and support - contact through the web page please
 
I'm too broke after buying my PC to buy any utilites. It's only for my
private use. But if I was in a work environment this seems a very handy
utility.
Evi

I'll see if I can figure out the
 
Pegasus (MVP) said:
If your CD is configured to behave like a floppy disk then
you can use a "smart" backup process:

xcopy /s /d /c "c:\My Documents\*.doc" "E:\My Documents"

Start a Command Prompt and type this command:

xcopy /?

to see the meaning of the various switches. In your case, the /d
switch is important.
That sounds like what I want. I'll have a look at the xcopy help and see if
I can make sense of it (otherwise I'll be back). I assume that my CD is
configured to behave like a floppy - I have Direct CD and can drag and drop
files onto it as I would onto an A drive floppy. Thanks again Peg
Evi
 
I believe you can use it for 30 days & I think it's only
$30. For that much, without it you'll spend considerable
time & mistakes doing it manually! Something to think
about.

You can also probably find it out on the internet
somewhere.
 
Pegasus (MVP) said:
If your CD is configured to behave like a floppy disk then
you can use a "smart" backup process:

xcopy /s /d /c "c:\My Documents\*.doc" "E:\My Documents"

Start a Command Prompt and type this command:

xcopy /?

to see the meaning of the various switches. In your case, the /d
switch is important.

This is certainly what I want but I've just been testing it out. I made a
folder on my hard drive D: drive called TestFolder and put a couple of text
files

At the command prompt I typed in

xcopy /d /s /y D:\TestFolder\*.* E:\TestFolder\

That worked great, creating TestFolder on E and copying the text files
across. When I typed something into one the text files on D, and again typed
the above, it spotted that and copied that across to E without copying the
other, unchanged files again.

BUT

I put a subfolder inside TestFolder on my D: drive. I called in
FoldInTestFolder. I put a text file into it and repeated my command as
before.

Although the report appeared that the new file in FoldInTestFolder had been
copied across, it wasn't, nor was the folder created in E:

What have I done wrong?

Evi
 
Using xcopy is free :) I can already use it to back up within a folder and
if Pegasus can tell me where I went wrong, it will probably be able to do
exactly what I wanted.

Otherwise, I'll just make a series of batch files and (if I can figure out
how) write a final one to run one batch file after the other.
Evi
 
Evi said:
This is certainly what I want but I've just been testing it out. I made a
folder on my hard drive D: drive called TestFolder and put a couple of text
files

At the command prompt I typed in

xcopy /d /s /y D:\TestFolder\*.* E:\TestFolder\

That worked great, creating TestFolder on E and copying the text files
across. When I typed something into one the text files on D, and again typed
the above, it spotted that and copied that across to E without copying the
other, unchanged files again.

BUT

I put a subfolder inside TestFolder on my D: drive. I called in
FoldInTestFolder. I put a text file into it and repeated my command as
before.

Although the report appeared that the new file in FoldInTestFolder had been
copied across, it wasn't, nor was the folder created in E:

What have I done wrong?

Evi

What you report contradicts my long-standing experience
with xcopy. If you still have an issue, do this:

- Create a batch file (e.g. c:\tools\test.bat) and place the
following lines inside:
@echo off
xcopy /d /s /y D:\TestFolder\*.* E:\TestFolder\ 1>c:\test.log
2>c:\test.err
dir /s d:\TestFolder >> c:\test.log
dir /s e:\TestFolder >> c:\test.log
- Run this batch file
- Paste the contents of the following files into your response:
* c:\tools\test.bat
* c:\test.log
* c:\test.err
 
files

What you report contradicts my long-standing experience
with xcopy. If you still have an issue, do this:

- Create a batch file (e.g. c:\tools\test.bat) and place the
following lines inside:
@echo off
xcopy /d /s /y D:\TestFolder\*.* E:\TestFolder\ 1>c:\test.log
2>c:\test.err
dir /s d:\TestFolder >> c:\test.log
dir /s e:\TestFolder >> c:\test.log
- Run this batch file
- Paste the contents of the following files into your response:
* c:\tools\test.bat
* c:\test.log
* c:\test.err


Sorry Peg. I'd actually typed E\ instead of E:\.
Found the files on my main hard drive (blush)
Evi
 
Back
Top