MS Dos - Xcopy
Author
Discussion

Jay-Aim

Original Poster:

598 posts

271 months

Friday 6th May 2005
quotequote all
trying to copy a directory to E Drive (OS=XP Pro) I want to exclude all .pst files Command is: XCopy "\\server\username\" "E:\folder\" /exclude:.pst also tried XCopy "\\server\username\" "E:\folder\" /exclude:".pst" both return can't read file what's wrong with the exclude bit?

Podie

46,649 posts

305 months

Friday 6th May 2005
quotequote all
Don't you need a wildcard..? eg

*.pst

Jay-Aim

Original Poster:

598 posts

271 months

Friday 6th May 2005
quotequote all
Podie said:
Don't you need a wildcard..? eg

*.pst


tried that too

help only refers to enter .pst

pdV6

16,442 posts

291 months

Friday 6th May 2005
quotequote all
Nope- the exclude argument is the name of a text file that contains a list of strings to match for the exclusion.

Therefore, create yourself a file called c:\exclusions.txt edit it and put .pst in it:



text file said:

.pst




and then change your command line to:

XCopy "\\server\username\" "E:\folder\" /exclude:c:\exclusions.txt


>> Edited by pdV6 on Friday 6th May 11:00

Jay-Aim

Original Poster:

598 posts

271 months

Friday 6th May 2005
quotequote all
pdV6 said:
Nope- the exclude argument is the name of a text file that contains a list of strings to match for the exclusion.

Therefore, create yourself a file called c:exclusions.txt edit it and put .pst in it:






text file said:

.pst






done that and get the same message ie
can't read C:exclusions.txt




and then change your command line to:

XCopy "serverusername" "E:folder" /exclude:c:exclusions.txt


>> Edited by pdV6 on Friday 6th May 11:00




We've been following each other

now edited my command with your edit and working away

Thanks





>> Edited by Jay-Aim on Friday 6th May 11:11

>> Edited by Jay-Aim on Friday 6th May 11:13

pdV6

16,442 posts

291 months

Friday 6th May 2005
quotequote all
Its them silly "\"'s that kill these kinds of discussions!