Aristos M. Vasiliou | 27 Mar 10:03 2008
Picon

XCOPY exclude problem

This is a bactch file I want to use for backing up:

---------------------------------------------------------------------
backup.cmd

SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyExcludes.txt"
SET RPATH="C:\Documents and Settings\user\Desktop\copy1"
SET LPATH="C:\Documents and Settings\user\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause

---------------------------------------------------------------------
This is the contents of MyExcludes.txt file

"C:\Documents and Settings\user\Desktop\copy1\excludedfolder"
---------------------------------------------------------------------

And this is the result:

C:\Documents and Settings\user\Desktop>SET COMMAND=XCOPY /D /E /C /I /H /R /Y /E
XCLUDE:"MyExcludes.txt"

C:\Documents and Settings\user\Desktop>SET RPATH="C:\Documents and Settings\user
\Desktop\copy1"

C:\Documents and Settings\user\Desktop>SET LPATH="C:\Documents and Settings\user
\Desktop\copy2"

C:\Documents and Settings\user\Desktop>XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyEx
cludes.txt" "C:\Documents and Settings\user\Desktop\copy1" "C:\Documents and Set
(Continue reading)

foxidrive | 27 Mar 14:58 2008
Picon

Re: XCOPY exclude problem

On Thu, 27 Mar 2008 11:03:16 +0200, "Aristos M. Vasiliou"
<aristos@...> wrote:

>This is a bactch file I want to use for backing up:
>
>---------------------------------------------------------------------
>backup.cmd
>
>SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyExcludes.txt"
>SET RPATH="C:\Documents and Settings\user\Desktop\copy1"
>SET LPATH="C:\Documents and Settings\user\Desktop\copy2"
>%COMMAND% %RPATH% %LPATH%
>pause

>Can't read file: "MyExcludes.txt"
>
>0 File(s) copied
>
>I don't know why it cannot read from the MyExcludes.txt file.

Take the double quotes away from the /EXCLUDE:"MyExcludes.txt" switch.

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links

<*> To visit your group on the web, go to:
(Continue reading)

Byrne, Derek | 28 Mar 11:04 2008
Picon

RE: XCOPY exclude problem

Hi Mic,

  Aye, I tried that too, but it ended up skipping the /EXCLUDE switch entirely and copied the whole subdirectory:
  (was hoping to look into this further - eg. using a directory structure without spaces, hence removing the
"" in the MyExcludes.txt file, but work, as usual, gets in the way *sigh*)

 
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>dir
 Volume in drive C has no label.
 Volume Serial Number is 68B2-4AE9
 Directory of C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch
27/03/2008  09:27    <DIR>          .
27/03/2008  09:27    <DIR>          ..
28/03/2008  10:02               218 backup.cmd
27/03/2008  09:26                65 MyExcludes.txt
               2 File(s)            283 bytes
               2 Dir(s)   3,956,375,552 bytes free
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
set RPATH="C:\Documents and Settings\dbyrne\Desktop\copy1"
set LPATH="C:\Documents and Settings\dbyrne\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type MyExcludes.txt
"C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>backup
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>SET COMMAND=XCOPY /D /E
 /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>set RPATH="C:\Documents
 and Settings\dbyrne\Desktop\copy1"
(Continue reading)

Aristos M. Vasiliou | 28 Mar 12:31 2008
Picon

RE: XCOPY exclude problem

Yes, my batch file skipped the /exclude too.

Aristos

From: batchworld@...
[mailto:batchworld@...] On
Behalf Of Byrne, Derek
Sent: Friday, March 28, 2008 12:04 PM
To: batchworld@...
Subject: RE: [BATCH WORLD] XCOPY exclude problem

Hi Mic,

Aye, I tried that too, but it ended up skipping the /EXCLUDE switch
entirely and copied the whole subdirectory:
(was hoping to look into this further - eg. using a directory structure
without spaces, hence removing the "" in the MyExcludes.txt file, but
work, as usual, gets in the way *sigh*)

C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>dir
Volume in drive C has no label.
Volume Serial Number is 68B2-4AE9
Directory of C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch
27/03/2008 09:27 <DIR> .
27/03/2008 09:27 <DIR> ..
28/03/2008 10:02 218 backup.cmd
27/03/2008 09:26 65 MyExcludes.txt
2 File(s) 283 bytes
2 Dir(s) 3,956,375,552 bytes free
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
(Continue reading)

foxidrive | 28 Mar 12:42 2008
Picon

Re: XCOPY exclude problem

On Fri, 28 Mar 2008 10:04:05 -0000, "Byrne, Derek"
<Derek.Byrne@...> wrote:

G'day Derek,

>  Aye, I tried that too, but it ended up skipping the /EXCLUDE switch entirely and copied the whole subdirectory:

Remove the double quotes from within the exclude file itself -  it would appear a different programmer wrote
that bit, breaking the past methods.

c:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
 <at> echo off
echo C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder>MyExcludes.txt
SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
set RPATH="C:\Documents and Settings\dbyrne\Desktop\copy1"
set LPATH="C:\Documents and Settings\dbyrne\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause
c:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>backup
C:\Documents and Settings\dbyrne\Desktop\copy1\d2.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\d3.txt
2 File(s) copied
Press any key to continue . . .

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links
(Continue reading)

asdf_phyman | 5 Mar 17:24 2008

How can you compare file dates?

Hi,

I'm running XP and I'd like to know if someone knows how to compare two
different files' dates.

Here's what I'd like to do:

if filedateX is older than filedateY(

     rem do something
)

But I can't seem to find a way to do this. Is there any way to get a
files time/date stamp so that it can be placed in a variable for
comparison?

FC doesn't seem to work as it seems to do everything else except provide
a time/date stamp. I've read that Forfiles can do something like this
but my system nor will the target systems doesn't have this option.

Any help would be appreciated.

Paul

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links
(Continue reading)

mikey411 | 3 Mar 21:31 2008
Picon

find drive letter of external hard drive


Hi All,

I'm working on a backup solution to back up certain folder on the C: drive
onto an external drive.
The drive letter of the external drive is not constant since each drive
letter could be used for network mapped drives or other external usb device. 
As the users that I will be deploying it to do not have admin rights on
their computer, they would not be able to go into computer management to
change the drive letter that I am using in my backup solution scripts.
So I'm in need of a batch file that would return the drive letter of that
specific external drive which will be a Seagate FreeAgent Desktop hard
drive.

Thanks!
Mike

--

-- 
View this message in context: http://www.nabble.com/find-drive-letter-of-external-hard-drive-tp15808063p15808063.html
Sent from the Batch World mailing list archive at Nabble.com.

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/batchworld/
(Continue reading)

Jason Wilke | 18 Mar 21:35 2008
Picon

spaces in path

I'm sorry if this is repeated - this seems like a basic question, but 
I have not used DOS in ages.

I'm trying to create a batch file, and I can't get it to recognise 
the path.

When I change to Documents and Settings, I use Docume~1 and it 
recognises it.

My problem is that Local is only 5 letters, and it doesn't recognise 
Local~1 or Local ~1 or "Local Settings".

I've looked on the help files, a dozen web pages about DOS, and I 
searched previous messages about spaces.  I'm trying to add the 
command:

del /q C:\Docume~1\jwilke\Local Settings\Temp\*.*

As a correlary, I'm assuming that when I get there, there will be 
kickbacks for 'files in use'.  If someone knows a switch to handle 
that, it would be useful, too.

Thanks for your help.

Jason Wilke
Alexandria VA

------------------------------------

To Post a message, send it to:   batchworld@...
(Continue reading)


Gmane