Sophisticated(!) copying in DOS



RJB
07-10-2005, 12:42 AM
Let's say I have ten files in a subdirectory, and I want to write a batch
file to copy ONLY five of them...

The five I do NOT want to copy all start with the same letters in their
filenames. The five I DO want to copy are all different. I cannot change this
attribute, or the subdirectory in which they are stored.

In other words, I have the following files:

ABC Jackson.fil
ABC Smith.fil
ABC Alias.fil
ABC Lost.fil
ABC Polar.fil
Ice Cream.fil
Pizza.fil
Beer.fil
Accounts.fil
Salary.fil

I want to write a script that will copy "Ice Cream", "Pizza", "Beer",
"Accounts", and "Salary", but that will SKIP the "ABC Jackson", "ABC Alias",
etc.

I know if I did "copy ABC*.fil" it would do the EXACT OPPOSITE of what I
want... Is there a "contra"command that would pull this off?

Thanks!

Bob I
07-10-2005, 12:42 AM
Xcopy with the /exclude switch. Make a file listing what to exclude and
then use that as "file1" in the parameter list

see XCOPY /?

RJB wrote:

> Let's say I have ten files in a subdirectory, and I want to write a batch
> file to copy ONLY five of them...
>
> The five I do NOT want to copy all start with the same letters in their
> filenames. The five I DO want to copy are all different. I cannot change this
> attribute, or the subdirectory in which they are stored.
>
> In other words, I have the following files:
>
> ABC Jackson.fil
> ABC Smith.fil
> ABC Alias.fil
> ABC Lost.fil
> ABC Polar.fil
> Ice Cream.fil
> Pizza.fil
> Beer.fil
> Accounts.fil
> Salary.fil
>
> I want to write a script that will copy "Ice Cream", "Pizza", "Beer",
> "Accounts", and "Salary", but that will SKIP the "ABC Jackson", "ABC Alias",
> etc.
>
> I know if I did "copy ABC*.fil" it would do the EXACT OPPOSITE of what I
> want... Is there a "contra"command that would pull this off?
>
> Thanks!

RJB
07-10-2005, 12:42 AM
Which begs the next question...

What is this "file listing" of which you speak? Is that like a mini-batch
file?

Thanks!

"Bob I" wrote:

> Xcopy with the /exclude switch. Make a file listing what to exclude and
> then use that as "file1" in the parameter list
>
> see XCOPY /?
>
> RJB wrote:
>
> > Let's say I have ten files in a subdirectory, and I want to write a batch
> > file to copy ONLY five of them...
> >
> > The five I do NOT want to copy all start with the same letters in their
> > filenames. The five I DO want to copy are all different. I cannot change this
> > attribute, or the subdirectory in which they are stored.
> >
> > In other words, I have the following files:
> >
> > ABC Jackson.fil
> > ABC Smith.fil
> > ABC Alias.fil
> > ABC Lost.fil
> > ABC Polar.fil
> > Ice Cream.fil
> > Pizza.fil
> > Beer.fil
> > Accounts.fil
> > Salary.fil
> >
> > I want to write a script that will copy "Ice Cream", "Pizza", "Beer",
> > "Accounts", and "Salary", but that will SKIP the "ABC Jackson", "ABC Alias",
> > etc.
> >
> > I know if I did "copy ABC*.fil" it would do the EXACT OPPOSITE of what I
> > want... Is there a "contra"command that would pull this off?
> >
> > Thanks!
>
>

Pegasus \(MVP\)
07-10-2005, 12:43 AM
"RJB" <RJB@discussions.microsoft.com> wrote in message
news:79A6A871-72BB-4C46-B01F-1E9D689DBE8D@microsoft.com...
> Let's say I have ten files in a subdirectory, and I want to write a batch
> file to copy ONLY five of them...
>
> The five I do NOT want to copy all start with the same letters in their
> filenames. The five I DO want to copy are all different. I cannot change
this
> attribute, or the subdirectory in which they are stored.
>
> In other words, I have the following files:
>
> ABC Jackson.fil
> ABC Smith.fil
> ABC Alias.fil
> ABC Lost.fil
> ABC Polar.fil
> Ice Cream.fil
> Pizza.fil
> Beer.fil
> Accounts.fil
> Salary.fil
>
> I want to write a script that will copy "Ice Cream", "Pizza", "Beer",
> "Accounts", and "Salary", but that will SKIP the "ABC Jackson", "ABC
Alias",
> etc.
>
> I know if I did "copy ABC*.fil" it would do the EXACT OPPOSITE of what I
> want... Is there a "contra"command that would pull this off?
>
> Thanks!

Try this one-line batch file:

@echo off
for /f "tokens=*" %%* in ('dir /ad /b') do echo %%* | find /i "ABC" > nul ||
echo xcopy "%%*" TargetFolder

Remove the second "echo" to activate the command.

Bob I
07-10-2005, 12:43 AM
Did you read "XCOPY /?" ?

The file contains a list of what should be excluded. In this case ABC*.fil

RJB wrote:

> Which begs the next question...
>
> What is this "file listing" of which you speak? Is that like a mini-batch
> file?
>
> Thanks!
>
> "Bob I" wrote:
>
>
>>Xcopy with the /exclude switch. Make a file listing what to exclude and
>>then use that as "file1" in the parameter list
>>
>>see XCOPY /?
>>
>>RJB wrote:
>>
>>
>>>Let's say I have ten files in a subdirectory, and I want to write a batch
>>>file to copy ONLY five of them...
>>>
>>>The five I do NOT want to copy all start with the same letters in their
>>>filenames. The five I DO want to copy are all different. I cannot change this
>>>attribute, or the subdirectory in which they are stored.
>>>
>>>In other words, I have the following files:
>>>
>>>ABC Jackson.fil
>>>ABC Smith.fil
>>>ABC Alias.fil
>>>ABC Lost.fil
>>>ABC Polar.fil
>>>Ice Cream.fil
>>>Pizza.fil
>>>Beer.fil
>>>Accounts.fil
>>>Salary.fil
>>>
>>>I want to write a script that will copy "Ice Cream", "Pizza", "Beer",
>>>"Accounts", and "Salary", but that will SKIP the "ABC Jackson", "ABC Alias",
>>>etc.
>>>
>>>I know if I did "copy ABC*.fil" it would do the EXACT OPPOSITE of what I
>>>want... Is there a "contra"command that would pull this off?
>>>
>>>Thanks!
>>
>>

Pegasus \(MVP\)
07-10-2005, 12:43 AM
Much nicer than my own suggestion!


"Bob I" <birelan@yahoo.com> wrote in message
news:%23h7oIKTYFHA.2288@TK2MSFTNGP14.phx.gbl...
> Did you read "XCOPY /?" ?
>
> The file contains a list of what should be excluded. In this case ABC*.fil
>
> RJB wrote:
>
> > Which begs the next question...
> >
> > What is this "file listing" of which you speak? Is that like a
mini-batch
> > file?
> >
> > Thanks!
> >
> > "Bob I" wrote:
> >
> >
> >>Xcopy with the /exclude switch. Make a file listing what to exclude and
> >>then use that as "file1" in the parameter list
> >>
> >>see XCOPY /?
> >>
> >>RJB wrote:
> >>
> >>
> >>>Let's say I have ten files in a subdirectory, and I want to write a
batch
> >>>file to copy ONLY five of them...
> >>>
> >>>The five I do NOT want to copy all start with the same letters in their
> >>>filenames. The five I DO want to copy are all different. I cannot
change this
> >>>attribute, or the subdirectory in which they are stored.
> >>>
> >>>In other words, I have the following files:
> >>>
> >>>ABC Jackson.fil
> >>>ABC Smith.fil
> >>>ABC Alias.fil
> >>>ABC Lost.fil
> >>>ABC Polar.fil
> >>>Ice Cream.fil
> >>>Pizza.fil
> >>>Beer.fil
> >>>Accounts.fil
> >>>Salary.fil
> >>>
> >>>I want to write a script that will copy "Ice Cream", "Pizza", "Beer",
> >>>"Accounts", and "Salary", but that will SKIP the "ABC Jackson", "ABC
Alias",
> >>>etc.
> >>>
> >>>I know if I did "copy ABC*.fil" it would do the EXACT OPPOSITE of what
I
> >>>want... Is there a "contra"command that would pull this off?
> >>>
> >>>Thanks!
> >>
> >>
>

RJB
07-10-2005, 12:43 AM
Yeah, I gotta say, Pegasus, your solution gives me an ice cream headache.

I still don't know if I get the "file listing" info...
From your initial post, it seems as if I am creating a file - called "file1"
- and in that file it includes a list of excluded files.

But I probably just want to do
/EXCLUDE ABC*.fil

Which is what your most recent post says. Right?

Anyway, I think I have enough info to experiment with.

Thanks,

Bob I
07-10-2005, 12:44 AM
Inline,

RJB wrote:

> Yeah, I gotta say, Pegasus, your solution gives me an ice cream headache.
>
> I still don't know if I get the "file listing" info...
> From your initial post, it seems as if I am creating a file - called "file1"
> - and in that file it includes a list of excluded files.

CORRECT

>
> But I probably just want to do
> /EXCLUDE ABC*.fil

Wrong, should be like this

XCOPY /EXCLUDE FILELIST.TXT

FILELIST.TXT contents are ABC*.fil
one entry per line, you may have to experiment with it a bit.

>
> Which is what your most recent post says. Right?

nope.
>
> Anyway, I think I have enough info to experiment with.
>
> Thanks,
>
>

RJB
07-10-2005, 12:44 AM
At the risk of being redundantly monotonous and obtuse:

1) Create a notepad file
2) In the file, type:
ABC Jackson.fil
ABC Smith.fil
ABC Alias.fil
ABC Lost.fil
ABC Polar.fil
3) Save it as "filelist.txt"
4) In the xcopy command,
XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y

Close?


"Bob I" wrote:

> Inline,
>
> RJB wrote:
>
> > Yeah, I gotta say, Pegasus, your solution gives me an ice cream headache.
> >
> > I still don't know if I get the "file listing" info...
> > From your initial post, it seems as if I am creating a file - called "file1"
> > - and in that file it includes a list of excluded files.
>
> CORRECT
>
> >
> > But I probably just want to do
> > /EXCLUDE ABC*.fil
>
> Wrong, should be like this
>
> XCOPY /EXCLUDE FILELIST.TXT
>
> FILELIST.TXT contents are ABC*.fil
> one entry per line, you may have to experiment with it a bit.
>
> >
> > Which is what your most recent post says. Right?
>
> nope.
> >
> > Anyway, I think I have enough info to experiment with.
> >
> > Thanks,
> >
> >
>
>

Bob I
07-10-2005, 12:44 AM
BINGO! We have a Winner! :-) :-)

RJB wrote:

> At the risk of being redundantly monotonous and obtuse:
>
> 1) Create a notepad file
> 2) In the file, type:
> ABC Jackson.fil
> ABC Smith.fil
> ABC Alias.fil
> ABC Lost.fil
> ABC Polar.fil
> 3) Save it as "filelist.txt"
> 4) In the xcopy command,
> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> \\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>
> Close?
>
>
> "Bob I" wrote:
>
>
>>Inline,
>>
>>RJB wrote:
>>
>>
>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream headache.
>>>
>>>I still don't know if I get the "file listing" info...
>>>From your initial post, it seems as if I am creating a file - called "file1"
>>>- and in that file it includes a list of excluded files.
>>
>>CORRECT
>>
>>
>>>But I probably just want to do
>>>/EXCLUDE ABC*.fil
>>
>>Wrong, should be like this
>>
>>XCOPY /EXCLUDE FILELIST.TXT
>>
>>FILELIST.TXT contents are ABC*.fil
>>one entry per line, you may have to experiment with it a bit.
>>
>>
>>>Which is what your most recent post says. Right?
>>
>>nope.
>>
>>>Anyway, I think I have enough info to experiment with.
>>>
>>>Thanks,
>>>
>>>
>>
>>

RJB
07-10-2005, 12:45 AM
I've tried every permutation I can think of, and the results I get are:
Can't read file: XXX

0 File(s) copied

(where XXX is whatever file comes after the "/exclude:" switch.

The "donotcopy.txt" file is in the SOURCE directory, correct?

Also, if I just try to exclude file(s) by name - a la /EXCLUDE:ABC*.fil, I
get the same result...
Can't read file: ABC*.fil

0 File(s) copied

What the heck is going on???



"Bob I" wrote:

> BINGO! We have a Winner! :-) :-)
>
> RJB wrote:
>
> > At the risk of being redundantly monotonous and obtuse:
> >
> > 1) Create a notepad file
> > 2) In the file, type:
> > ABC Jackson.fil
> > ABC Smith.fil
> > ABC Alias.fil
> > ABC Lost.fil
> > ABC Polar.fil
> > 3) Save it as "filelist.txt"
> > 4) In the xcopy command,
> > XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> > \\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> >
> > Close?
> >
> >
> > "Bob I" wrote:
> >
> >
> >>Inline,
> >>
> >>RJB wrote:
> >>
> >>
> >>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream headache.
> >>>
> >>>I still don't know if I get the "file listing" info...
> >>>From your initial post, it seems as if I am creating a file - called "file1"
> >>>- and in that file it includes a list of excluded files.
> >>
> >>CORRECT
> >>
> >>
> >>>But I probably just want to do
> >>>/EXCLUDE ABC*.fil
> >>
> >>Wrong, should be like this
> >>
> >>XCOPY /EXCLUDE FILELIST.TXT
> >>
> >>FILELIST.TXT contents are ABC*.fil
> >>one entry per line, you may have to experiment with it a bit.
> >>
> >>
> >>>Which is what your most recent post says. Right?
> >>
> >>nope.
> >>
> >>>Anyway, I think I have enough info to experiment with.
> >>>
> >>>Thanks,
> >>>
> >>>
> >>
> >>
>
>

Pegasus \(MVP\)
07-10-2005, 12:46 AM
Let's see your precise command, and the contents of the
exclude file.


"RJB" <RJB@discussions.microsoft.com> wrote in message
news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
> I've tried every permutation I can think of, and the results I get are:
> Can't read file: XXX
>
> 0 File(s) copied
>
> (where XXX is whatever file comes after the "/exclude:" switch.
>
> The "donotcopy.txt" file is in the SOURCE directory, correct?
>
> Also, if I just try to exclude file(s) by name - a la /EXCLUDE:ABC*.fil, I
> get the same result...
> Can't read file: ABC*.fil
>
> 0 File(s) copied
>
> What the heck is going on???
>
>
>
> "Bob I" wrote:
>
> > BINGO! We have a Winner! :-) :-)
> >
> > RJB wrote:
> >
> > > At the risk of being redundantly monotonous and obtuse:
> > >
> > > 1) Create a notepad file
> > > 2) In the file, type:
> > > ABC Jackson.fil
> > > ABC Smith.fil
> > > ABC Alias.fil
> > > ABC Lost.fil
> > > ABC Polar.fil
> > > 3) Save it as "filelist.txt"
> > > 4) In the xcopy command,
> > > XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> > > \\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> > >
> > > Close?
> > >
> > >
> > > "Bob I" wrote:
> > >
> > >
> > >>Inline,
> > >>
> > >>RJB wrote:
> > >>
> > >>
> > >>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
headache.
> > >>>
> > >>>I still don't know if I get the "file listing" info...
> > >>>From your initial post, it seems as if I am creating a file - called
"file1"
> > >>>- and in that file it includes a list of excluded files.
> > >>
> > >>CORRECT
> > >>
> > >>
> > >>>But I probably just want to do
> > >>>/EXCLUDE ABC*.fil
> > >>
> > >>Wrong, should be like this
> > >>
> > >>XCOPY /EXCLUDE FILELIST.TXT
> > >>
> > >>FILELIST.TXT contents are ABC*.fil
> > >>one entry per line, you may have to experiment with it a bit.
> > >>
> > >>
> > >>>Which is what your most recent post says. Right?
> > >>
> > >>nope.
> > >>
> > >>>Anyway, I think I have enough info to experiment with.
> > >>>
> > >>>Thanks,
> > >>>
> > >>>
> > >>
> > >>
> >
> >

RJB
07-10-2005, 12:46 AM
It's all listed in the screens above

The donotcopy.txt contains a list - one per line - of each exclded file.

The long and short is

xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
\\receivingpath\subdirectory





"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
> Let's see your precise command, and the contents of the
> exclude file.
>
>
> "RJB" <RJB@discussions.microsoft.com> wrote in message
> news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>> I've tried every permutation I can think of, and the results I get are:
>> Can't read file: XXX
>>
>> 0 File(s) copied
>>
>> (where XXX is whatever file comes after the "/exclude:" switch.
>>
>> The "donotcopy.txt" file is in the SOURCE directory, correct?
>>
>> Also, if I just try to exclude file(s) by name - a la /EXCLUDE:ABC*.fil,
>> I
>> get the same result...
>> Can't read file: ABC*.fil
>>
>> 0 File(s) copied
>>
>> What the heck is going on???
>>
>>
>>
>> "Bob I" wrote:
>>
>> > BINGO! We have a Winner! :-) :-)
>> >
>> > RJB wrote:
>> >
>> > > At the risk of being redundantly monotonous and obtuse:
>> > >
>> > > 1) Create a notepad file
>> > > 2) In the file, type:
>> > > ABC Jackson.fil
>> > > ABC Smith.fil
>> > > ABC Alias.fil
>> > > ABC Lost.fil
>> > > ABC Polar.fil
>> > > 3) Save it as "filelist.txt"
>> > > 4) In the xcopy command,
>> > > XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>> > > \\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>> > >
>> > > Close?
>> > >
>> > >
>> > > "Bob I" wrote:
>> > >
>> > >
>> > >>Inline,
>> > >>
>> > >>RJB wrote:
>> > >>
>> > >>
>> > >>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
> headache.
>> > >>>
>> > >>>I still don't know if I get the "file listing" info...
>> > >>>From your initial post, it seems as if I am creating a file - called
> "file1"
>> > >>>- and in that file it includes a list of excluded files.
>> > >>
>> > >>CORRECT
>> > >>
>> > >>
>> > >>>But I probably just want to do
>> > >>>/EXCLUDE ABC*.fil
>> > >>
>> > >>Wrong, should be like this
>> > >>
>> > >>XCOPY /EXCLUDE FILELIST.TXT
>> > >>
>> > >>FILELIST.TXT contents are ABC*.fil
>> > >>one entry per line, you may have to experiment with it a bit.
>> > >>
>> > >>
>> > >>>Which is what your most recent post says. Right?
>> > >>
>> > >>nope.
>> > >>
>> > >>>Anyway, I think I have enough info to experiment with.
>> > >>>
>> > >>>Thanks,
>> > >>>
>> > >>>
>> > >>
>> > >>
>> >
>> >
>
>

Pegasus \(MVP\)
07-10-2005, 12:46 AM
From the xcopy help screen (xcopy /?):

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
[/EXCLUDE:file1[+file2][+file3]...]

/EXCLUDE:file1[+file2][+file3]...

In other words: you have to place a colon after the parameter "exclude".

If you still have problems, please quote your exact xcopy command,
not a generic version, and the contents of the exclude file.



"RJB" <notpublic@aol.com> wrote in message
news:8yvle.3534$zb.1928@trndny01...
> It's all listed in the screens above
>
> The donotcopy.txt contains a list - one per line - of each exclded file.
>
> The long and short is
>
> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
> \\receivingpath\subdirectory
>
>
>
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
> > Let's see your precise command, and the contents of the
> > exclude file.
> >
> >
> > "RJB" <RJB@discussions.microsoft.com> wrote in message
> > news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
> >> I've tried every permutation I can think of, and the results I get are:
> >> Can't read file: XXX
> >>
> >> 0 File(s) copied
> >>
> >> (where XXX is whatever file comes after the "/exclude:" switch.
> >>
> >> The "donotcopy.txt" file is in the SOURCE directory, correct?
> >>
> >> Also, if I just try to exclude file(s) by name - a la
/EXCLUDE:ABC*.fil,
> >> I
> >> get the same result...
> >> Can't read file: ABC*.fil
> >>
> >> 0 File(s) copied
> >>
> >> What the heck is going on???
> >>
> >>
> >>
> >> "Bob I" wrote:
> >>
> >> > BINGO! We have a Winner! :-) :-)
> >> >
> >> > RJB wrote:
> >> >
> >> > > At the risk of being redundantly monotonous and obtuse:
> >> > >
> >> > > 1) Create a notepad file
> >> > > 2) In the file, type:
> >> > > ABC Jackson.fil
> >> > > ABC Smith.fil
> >> > > ABC Alias.fil
> >> > > ABC Lost.fil
> >> > > ABC Polar.fil
> >> > > 3) Save it as "filelist.txt"
> >> > > 4) In the xcopy command,
> >> > > XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> >> > > \\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> >> > >
> >> > > Close?
> >> > >
> >> > >
> >> > > "Bob I" wrote:
> >> > >
> >> > >
> >> > >>Inline,
> >> > >>
> >> > >>RJB wrote:
> >> > >>
> >> > >>
> >> > >>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
> > headache.
> >> > >>>
> >> > >>>I still don't know if I get the "file listing" info...
> >> > >>>From your initial post, it seems as if I am creating a file -
called
> > "file1"
> >> > >>>- and in that file it includes a list of excluded files.
> >> > >>
> >> > >>CORRECT
> >> > >>
> >> > >>
> >> > >>>But I probably just want to do
> >> > >>>/EXCLUDE ABC*.fil
> >> > >>
> >> > >>Wrong, should be like this
> >> > >>
> >> > >>XCOPY /EXCLUDE FILELIST.TXT
> >> > >>
> >> > >>FILELIST.TXT contents are ABC*.fil
> >> > >>one entry per line, you may have to experiment with it a bit.
> >> > >>
> >> > >>
> >> > >>>Which is what your most recent post says. Right?
> >> > >>
> >> > >>nope.
> >> > >>
> >> > >>>Anyway, I think I have enough info to experiment with.
> >> > >>>
> >> > >>>Thanks,
> >> > >>>
> >> > >>>
> >> > >>
> >> > >>
> >> >
> >> >
> >
> >
>
>

Bob I
07-10-2005, 12:47 AM
From the help
" /EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string should be in
a separate line in the files. When any of the strings match any part of
the absolute path of the file to be copied, that file will be excluded
from being copied. For example, specifying a string like \obj\ or .obj
will exclude all files underneath the directory obj or all files with
the .obj extension respectively."

So
/EXCLUDE:dontcopy.txt
NOT
/EXCLUDE dontcopy.txt

Since where you put the file resulted in "can't read xxx", I suggest
putting "dontcopy.txt" in a directory that is listed in the PATH listing.

RJB wrote:

> It's all listed in the screens above
>
> The donotcopy.txt contains a list - one per line - of each exclded file.
>
> The long and short is
>
> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
> \\receivingpath\subdirectory
>
>
>
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>
>>Let's see your precise command, and the contents of the
>>exclude file.
>>
>>
>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>
>>>I've tried every permutation I can think of, and the results I get are:
>>> Can't read file: XXX
>>>
>>> 0 File(s) copied
>>>
>>>(where XXX is whatever file comes after the "/exclude:" switch.
>>>
>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>
>>>Also, if I just try to exclude file(s) by name - a la /EXCLUDE:ABC*.fil,
>>>I
>>>get the same result...
>>>Can't read file: ABC*.fil
>>>
>>>0 File(s) copied
>>>
>>>What the heck is going on???
>>>
>>>
>>>
>>>"Bob I" wrote:
>>>
>>>
>>>>BINGO! We have a Winner! :-) :-)
>>>>
>>>>RJB wrote:
>>>>
>>>>
>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>
>>>>>1) Create a notepad file
>>>>>2) In the file, type:
>>>>>ABC Jackson.fil
>>>>>ABC Smith.fil
>>>>>ABC Alias.fil
>>>>>ABC Lost.fil
>>>>>ABC Polar.fil
>>>>>3) Save it as "filelist.txt"
>>>>>4) In the xcopy command,
>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>
>>>>>Close?
>>>>>
>>>>>
>>>>>"Bob I" wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Inline,
>>>>>>
>>>>>>RJB wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
>>
>>headache.
>>
>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>
>>>>>>>From your initial post, it seems as if I am creating a file - called
>>
>>"file1"
>>
>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>
>>>>>>CORRECT
>>>>>>
>>>>>>
>>>>>>
>>>>>>>But I probably just want to do
>>>>>>>/EXCLUDE ABC*.fil
>>>>>>
>>>>>>Wrong, should be like this
>>>>>>
>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>
>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>one entry per line, you may have to experiment with it a bit.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Which is what your most recent post says. Right?
>>>>>>
>>>>>>nope.
>>>>>>
>>>>>>
>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>
>>>>>>>Thanks,
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>
>
>

RJB
07-10-2005, 12:50 AM
Actually, I DO have the colon in there.... (I was careless in my retyping
the second time... Look back a coupla posts, and the colon's there!)

It has been long time since I've dealt with PATH listings... Where do I find
that? Is that in WIN.INI?

"Bob I" <birelan@yahoo.com> wrote in message
news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
> From the help
> " /EXCLUDE:file1[+file2][+file3]...
> Specifies a list of files containing strings. Each string should be in a
> separate line in the files. When any of the strings match any part of the
> absolute path of the file to be copied, that file will be excluded from
> being copied. For example, specifying a string like \obj\ or .obj will
> exclude all files underneath the directory obj or all files with the .obj
> extension respectively."
>
> So
> /EXCLUDE:dontcopy.txt
> NOT
> /EXCLUDE dontcopy.txt
>
> Since where you put the file resulted in "can't read xxx", I suggest
> putting "dontcopy.txt" in a directory that is listed in the PATH listing.
>
> RJB wrote:
>
>> It's all listed in the screens above
>>
>> The donotcopy.txt contains a list - one per line - of each exclded file.
>>
>> The long and short is
>>
>> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>> \\receivingpath\subdirectory
>>
>>
>>
>>
>>
>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>
>>>Let's see your precise command, and the contents of the
>>>exclude file.
>>>
>>>
>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>
>>>>I've tried every permutation I can think of, and the results I get are:
>>>> Can't read file: XXX
>>>>
>>>> 0 File(s) copied
>>>>
>>>>(where XXX is whatever file comes after the "/exclude:" switch.
>>>>
>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>
>>>>Also, if I just try to exclude file(s) by name - a la /EXCLUDE:ABC*.fil,
>>>>I
>>>>get the same result...
>>>>Can't read file: ABC*.fil
>>>>
>>>>0 File(s) copied
>>>>
>>>>What the heck is going on???
>>>>
>>>>
>>>>
>>>>"Bob I" wrote:
>>>>
>>>>
>>>>>BINGO! We have a Winner! :-) :-)
>>>>>
>>>>>RJB wrote:
>>>>>
>>>>>
>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>
>>>>>>1) Create a notepad file
>>>>>>2) In the file, type:
>>>>>>ABC Jackson.fil
>>>>>>ABC Smith.fil
>>>>>>ABC Alias.fil
>>>>>>ABC Lost.fil
>>>>>>ABC Polar.fil
>>>>>>3) Save it as "filelist.txt"
>>>>>>4) In the xcopy command,
>>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>
>>>>>>Close?
>>>>>>
>>>>>>
>>>>>>"Bob I" wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Inline,
>>>>>>>
>>>>>>>RJB wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
>>>
>>>headache.
>>>
>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>
>>>>>>>>From your initial post, it seems as if I am creating a file - called
>>>
>>>"file1"
>>>
>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>
>>>>>>>CORRECT
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>But I probably just want to do
>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>
>>>>>>>Wrong, should be like this
>>>>>>>
>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>
>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>one entry per line, you may have to experiment with it a bit.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>
>>>>>>>nope.
>>>>>>>
>>>>>>>
>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>
>>
>>
>

Pegasus \(MVP\)
07-10-2005, 12:50 AM
Never retype commands - use cut & paste!

You can see the path from a Command Prompt, by typing
just "path", without the quotes.

You set it in the Control Panel / System / Advanced / Environment
Variables.

I note that you seem to be a little reluctant to post your actual
command and the contents of the Exclude file.


"RJB" <notpublic@aol.com> wrote in message
news:kdqme.8263$zb.4096@trndny01...
> Actually, I DO have the colon in there.... (I was careless in my retyping
> the second time... Look back a coupla posts, and the colon's there!)
>
> It has been long time since I've dealt with PATH listings... Where do I
find
> that? Is that in WIN.INI?
>
> "Bob I" <birelan@yahoo.com> wrote in message
> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
> > From the help
> > " /EXCLUDE:file1[+file2][+file3]...
> > Specifies a list of files containing strings. Each string should be in
a
> > separate line in the files. When any of the strings match any part of
the
> > absolute path of the file to be copied, that file will be excluded from
> > being copied. For example, specifying a string like \obj\ or .obj will
> > exclude all files underneath the directory obj or all files with the
..obj
> > extension respectively."
> >
> > So
> > /EXCLUDE:dontcopy.txt
> > NOT
> > /EXCLUDE dontcopy.txt
> >
> > Since where you put the file resulted in "can't read xxx", I suggest
> > putting "dontcopy.txt" in a directory that is listed in the PATH
listing.
> >
> > RJB wrote:
> >
> >> It's all listed in the screens above
> >>
> >> The donotcopy.txt contains a list - one per line - of each exclded
file.
> >>
> >> The long and short is
> >>
> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
> >> \\receivingpath\subdirectory
> >>
> >>
> >>
> >>
> >>
> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
> >>
> >>>Let's see your precise command, and the contents of the
> >>>exclude file.
> >>>
> >>>
> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
> >>>
> >>>>I've tried every permutation I can think of, and the results I get
are:
> >>>> Can't read file: XXX
> >>>>
> >>>> 0 File(s) copied
> >>>>
> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
> >>>>
> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
> >>>>
> >>>>Also, if I just try to exclude file(s) by name - a la
/EXCLUDE:ABC*.fil,
> >>>>I
> >>>>get the same result...
> >>>>Can't read file: ABC*.fil
> >>>>
> >>>>0 File(s) copied
> >>>>
> >>>>What the heck is going on???
> >>>>
> >>>>
> >>>>
> >>>>"Bob I" wrote:
> >>>>
> >>>>
> >>>>>BINGO! We have a Winner! :-) :-)
> >>>>>
> >>>>>RJB wrote:
> >>>>>
> >>>>>
> >>>>>>At the risk of being redundantly monotonous and obtuse:
> >>>>>>
> >>>>>>1) Create a notepad file
> >>>>>>2) In the file, type:
> >>>>>>ABC Jackson.fil
> >>>>>>ABC Smith.fil
> >>>>>>ABC Alias.fil
> >>>>>>ABC Lost.fil
> >>>>>>ABC Polar.fil
> >>>>>>3) Save it as "filelist.txt"
> >>>>>>4) In the xcopy command,
> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> >>>>>>
> >>>>>>Close?
> >>>>>>
> >>>>>>
> >>>>>>"Bob I" wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Inline,
> >>>>>>>
> >>>>>>>RJB wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
> >>>
> >>>headache.
> >>>
> >>>>>>>>I still don't know if I get the "file listing" info...
> >>>>>>>
> >>>>>>>>From your initial post, it seems as if I am creating a file -
called
> >>>
> >>>"file1"
> >>>
> >>>>>>>>- and in that file it includes a list of excluded files.
> >>>>>>>
> >>>>>>>CORRECT
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>But I probably just want to do
> >>>>>>>>/EXCLUDE ABC*.fil
> >>>>>>>
> >>>>>>>Wrong, should be like this
> >>>>>>>
> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
> >>>>>>>
> >>>>>>>FILELIST.TXT contents are ABC*.fil
> >>>>>>>one entry per line, you may have to experiment with it a bit.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Which is what your most recent post says. Right?
> >>>>>>>
> >>>>>>>nope.
> >>>>>>>
> >>>>>>>
> >>>>>>>>Anyway, I think I have enough info to experiment with.
> >>>>>>>>
> >>>>>>>>Thanks,
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>
> >>
> >>
> >
>
>

RJB
07-10-2005, 12:53 AM
I added
PATH \\SOURCEDRIVE\SHAREDDOCS

And now get
'xcopy' is not recognized as an internal or external command,
operable program or batch file

I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?

btw, here is the full command in my batch file:

XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt C:\RECEIVE

My goal is to take all of the files (save the five listed in
"dontcopy.txt"!) and copy them from a subdirectory called "Mailroom" on my
server to a subdirectory called "Receive" on my laptop.

(The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)


Thanks,



"Bob I" <birelan@yahoo.com> wrote in message
news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
> From the help
> " /EXCLUDE:file1[+file2][+file3]...
> Specifies a list of files containing strings. Each string should be in a
> separate line in the files. When any of the strings match any part of the
> absolute path of the file to be copied, that file will be excluded from
> being copied. For example, specifying a string like \obj\ or .obj will
> exclude all files underneath the directory obj or all files with the .obj
> extension respectively."
>
> So
> /EXCLUDE:dontcopy.txt
> NOT
> /EXCLUDE dontcopy.txt
>
> Since where you put the file resulted in "can't read xxx", I suggest
> putting "dontcopy.txt" in a directory that is listed in the PATH listing.
>
> RJB wrote:
>
>> It's all listed in the screens above
>>
>> The donotcopy.txt contains a list - one per line - of each exclded file.
>>
>> The long and short is
>>
>> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>> \\receivingpath\subdirectory
>>
>>
>>
>>
>>
>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>
>>>Let's see your precise command, and the contents of the
>>>exclude file.
>>>
>>>
>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>
>>>>I've tried every permutation I can think of, and the results I get are:
>>>> Can't read file: XXX
>>>>
>>>> 0 File(s) copied
>>>>
>>>>(where XXX is whatever file comes after the "/exclude:" switch.
>>>>
>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>
>>>>Also, if I just try to exclude file(s) by name - a la /EXCLUDE:ABC*.fil,
>>>>I
>>>>get the same result...
>>>>Can't read file: ABC*.fil
>>>>
>>>>0 File(s) copied
>>>>
>>>>What the heck is going on???
>>>>
>>>>
>>>>
>>>>"Bob I" wrote:
>>>>
>>>>
>>>>>BINGO! We have a Winner! :-) :-)
>>>>>
>>>>>RJB wrote:
>>>>>
>>>>>
>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>
>>>>>>1) Create a notepad file
>>>>>>2) In the file, type:
>>>>>>ABC Jackson.fil
>>>>>>ABC Smith.fil
>>>>>>ABC Alias.fil
>>>>>>ABC Lost.fil
>>>>>>ABC Polar.fil
>>>>>>3) Save it as "filelist.txt"
>>>>>>4) In the xcopy command,
>>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>
>>>>>>Close?
>>>>>>
>>>>>>
>>>>>>"Bob I" wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Inline,
>>>>>>>
>>>>>>>RJB wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
>>>
>>>headache.
>>>
>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>
>>>>>>>>From your initial post, it seems as if I am creating a file - called
>>>
>>>"file1"
>>>
>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>
>>>>>>>CORRECT
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>But I probably just want to do
>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>
>>>>>>>Wrong, should be like this
>>>>>>>
>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>
>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>one entry per line, you may have to experiment with it a bit.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>
>>>>>>>nope.
>>>>>>>
>>>>>>>
>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>
>>
>>
>

Pegasus \(MVP\)
07-10-2005, 12:53 AM
With your "path" command you wrecked your existing path! The
correct way would be to type this:

path %path%;\\SourceDrive\ShareDocs.

However . . . adding SourceDrive\ShareDocs to the path makes no
sense, because SourceDrive\ShareDocs contains no executable
programs. The path is used to locate executable programs, not data
files.

Here is what you should type:

xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"

This is all one long line. Note the "/y" switch, the trailing backslash
after "c:\Receive\", and the sets of double quotes. Depending on
your actual names, they could be essential.


"RJB" <notpublic@aol.com> wrote in message
news:qg5ne.5780$Lb.1073@trndny05...
> I added
> PATH \\SOURCEDRIVE\SHAREDDOCS
>
> And now get
> 'xcopy' is not recognized as an internal or external command,
> operable program or batch file
>
> I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>
> btw, here is the full command in my batch file:
>
> XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt C:\RECEIVE
>
> My goal is to take all of the files (save the five listed in
> "dontcopy.txt"!) and copy them from a subdirectory called "Mailroom" on my
> server to a subdirectory called "Receive" on my laptop.
>
> (The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>
>
> Thanks,
>
>
>
> "Bob I" <birelan@yahoo.com> wrote in message
> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
> > From the help
> > " /EXCLUDE:file1[+file2][+file3]...
> > Specifies a list of files containing strings. Each string should be in
a
> > separate line in the files. When any of the strings match any part of
the
> > absolute path of the file to be copied, that file will be excluded from
> > being copied. For example, specifying a string like \obj\ or .obj will
> > exclude all files underneath the directory obj or all files with the
..obj
> > extension respectively."
> >
> > So
> > /EXCLUDE:dontcopy.txt
> > NOT
> > /EXCLUDE dontcopy.txt
> >
> > Since where you put the file resulted in "can't read xxx", I suggest
> > putting "dontcopy.txt" in a directory that is listed in the PATH
listing.
> >
> > RJB wrote:
> >
> >> It's all listed in the screens above
> >>
> >> The donotcopy.txt contains a list - one per line - of each exclded
file.
> >>
> >> The long and short is
> >>
> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
> >> \\receivingpath\subdirectory
> >>
> >>
> >>
> >>
> >>
> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
> >>
> >>>Let's see your precise command, and the contents of the
> >>>exclude file.
> >>>
> >>>
> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
> >>>
> >>>>I've tried every permutation I can think of, and the results I get
are:
> >>>> Can't read file: XXX
> >>>>
> >>>> 0 File(s) copied
> >>>>
> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
> >>>>
> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
> >>>>
> >>>>Also, if I just try to exclude file(s) by name - a la
/EXCLUDE:ABC*.fil,
> >>>>I
> >>>>get the same result...
> >>>>Can't read file: ABC*.fil
> >>>>
> >>>>0 File(s) copied
> >>>>
> >>>>What the heck is going on???
> >>>>
> >>>>
> >>>>
> >>>>"Bob I" wrote:
> >>>>
> >>>>
> >>>>>BINGO! We have a Winner! :-) :-)
> >>>>>
> >>>>>RJB wrote:
> >>>>>
> >>>>>
> >>>>>>At the risk of being redundantly monotonous and obtuse:
> >>>>>>
> >>>>>>1) Create a notepad file
> >>>>>>2) In the file, type:
> >>>>>>ABC Jackson.fil
> >>>>>>ABC Smith.fil
> >>>>>>ABC Alias.fil
> >>>>>>ABC Lost.fil
> >>>>>>ABC Polar.fil
> >>>>>>3) Save it as "filelist.txt"
> >>>>>>4) In the xcopy command,
> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> >>>>>>
> >>>>>>Close?
> >>>>>>
> >>>>>>
> >>>>>>"Bob I" wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Inline,
> >>>>>>>
> >>>>>>>RJB wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
> >>>
> >>>headache.
> >>>
> >>>>>>>>I still don't know if I get the "file listing" info...
> >>>>>>>
> >>>>>>>>From your initial post, it seems as if I am creating a file -
called
> >>>
> >>>"file1"
> >>>
> >>>>>>>>- and in that file it includes a list of excluded files.
> >>>>>>>
> >>>>>>>CORRECT
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>But I probably just want to do
> >>>>>>>>/EXCLUDE ABC*.fil
> >>>>>>>
> >>>>>>>Wrong, should be like this
> >>>>>>>
> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
> >>>>>>>
> >>>>>>>FILELIST.TXT contents are ABC*.fil
> >>>>>>>one entry per line, you may have to experiment with it a bit.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Which is what your most recent post says. Right?
> >>>>>>>
> >>>>>>>nope.
> >>>>>>>
> >>>>>>>
> >>>>>>>>Anyway, I think I have enough info to experiment with.
> >>>>>>>>
> >>>>>>>>Thanks,
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>
> >>
> >>
> >
>
>

RJB
07-10-2005, 12:55 AM
STILL a "Can't read file \\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"

I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
copies everything.

Also, I tried the line with an
"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of my
dog - and still got the "Can't read file ...grace.bmp"

So, it appears to be something it's not liking about "Exclude"?

Arggggghhhhh!






"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
> With your "path" command you wrecked your existing path! The
> correct way would be to type this:
>
> path %path%;\\SourceDrive\ShareDocs.
>
> However . . . adding SourceDrive\ShareDocs to the path makes no
> sense, because SourceDrive\ShareDocs contains no executable
> programs. The path is used to locate executable programs, not data
> files.
>
> Here is what you should type:
>
> xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
> /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>
> This is all one long line. Note the "/y" switch, the trailing backslash
> after "c:\Receive\", and the sets of double quotes. Depending on
> your actual names, they could be essential.
>
>
> "RJB" <notpublic@aol.com> wrote in message
> news:qg5ne.5780$Lb.1073@trndny05...
>> I added
>> PATH \\SOURCEDRIVE\SHAREDDOCS
>>
>> And now get
>> 'xcopy' is not recognized as an internal or external command,
>> operable program or batch file
>>
>> I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>>
>> btw, here is the full command in my batch file:
>>
>> XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt C:\RECEIVE
>>
>> My goal is to take all of the files (save the five listed in
>> "dontcopy.txt"!) and copy them from a subdirectory called "Mailroom" on
>> my
>> server to a subdirectory called "Receive" on my laptop.
>>
>> (The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>>
>>
>> Thanks,
>>
>>
>>
>> "Bob I" <birelan@yahoo.com> wrote in message
>> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>> > From the help
>> > " /EXCLUDE:file1[+file2][+file3]...
>> > Specifies a list of files containing strings. Each string should be in
> a
>> > separate line in the files. When any of the strings match any part of
> the
>> > absolute path of the file to be copied, that file will be excluded from
>> > being copied. For example, specifying a string like \obj\ or .obj will
>> > exclude all files underneath the directory obj or all files with the
> .obj
>> > extension respectively."
>> >
>> > So
>> > /EXCLUDE:dontcopy.txt
>> > NOT
>> > /EXCLUDE dontcopy.txt
>> >
>> > Since where you put the file resulted in "can't read xxx", I suggest
>> > putting "dontcopy.txt" in a directory that is listed in the PATH
> listing.
>> >
>> > RJB wrote:
>> >
>> >> It's all listed in the screens above
>> >>
>> >> The donotcopy.txt contains a list - one per line - of each exclded
> file.
>> >>
>> >> The long and short is
>> >>
>> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>> >> \\receivingpath\subdirectory
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>> >>
>> >>>Let's see your precise command, and the contents of the
>> >>>exclude file.
>> >>>
>> >>>
>> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>> >>>
>> >>>>I've tried every permutation I can think of, and the results I get
> are:
>> >>>> Can't read file: XXX
>> >>>>
>> >>>> 0 File(s) copied
>> >>>>
>> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
>> >>>>
>> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>> >>>>
>> >>>>Also, if I just try to exclude file(s) by name - a la
> /EXCLUDE:ABC*.fil,
>> >>>>I
>> >>>>get the same result...
>> >>>>Can't read file: ABC*.fil
>> >>>>
>> >>>>0 File(s) copied
>> >>>>
>> >>>>What the heck is going on???
>> >>>>
>> >>>>
>> >>>>
>> >>>>"Bob I" wrote:
>> >>>>
>> >>>>
>> >>>>>BINGO! We have a Winner! :-) :-)
>> >>>>>
>> >>>>>RJB wrote:
>> >>>>>
>> >>>>>
>> >>>>>>At the risk of being redundantly monotonous and obtuse:
>> >>>>>>
>> >>>>>>1) Create a notepad file
>> >>>>>>2) In the file, type:
>> >>>>>>ABC Jackson.fil
>> >>>>>>ABC Smith.fil
>> >>>>>>ABC Alias.fil
>> >>>>>>ABC Lost.fil
>> >>>>>>ABC Polar.fil
>> >>>>>>3) Save it as "filelist.txt"
>> >>>>>>4) In the xcopy command,
>> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>> >>>>>>
>> >>>>>>Close?
>> >>>>>>
>> >>>>>>
>> >>>>>>"Bob I" wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>>Inline,
>> >>>>>>>
>> >>>>>>>RJB wrote:
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
>> >>>
>> >>>headache.
>> >>>
>> >>>>>>>>I still don't know if I get the "file listing" info...
>> >>>>>>>
>> >>>>>>>>From your initial post, it seems as if I am creating a file -
> called
>> >>>
>> >>>"file1"
>> >>>
>> >>>>>>>>- and in that file it includes a list of excluded files.
>> >>>>>>>
>> >>>>>>>CORRECT
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>>But I probably just want to do
>> >>>>>>>>/EXCLUDE ABC*.fil
>> >>>>>>>
>> >>>>>>>Wrong, should be like this
>> >>>>>>>
>> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>> >>>>>>>
>> >>>>>>>FILELIST.TXT contents are ABC*.fil
>> >>>>>>>one entry per line, you may have to experiment with it a bit.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>>Which is what your most recent post says. Right?
>> >>>>>>>
>> >>>>>>>nope.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>>Anyway, I think I have enough info to experiment with.
>> >>>>>>>>
>> >>>>>>>>Thanks,
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>
>> >>>
>> >>
>> >>
>> >
>>
>>
>
>

guestfromhell
07-10-2005, 12:55 AM
theres a lot of doublethink in these replies. doing 'xcopy /exclude
abc*.fil 'is the same as copying them somewhere else then doin 'delete
abc*.fil' ,and a lot simpler.......easier to delete the one u dont want
rather than copy the ones u do want.................

DOS isnt sophisticated, its a programmers o/s, and tends not to pander
to what became known a 'Quiche Eaters' (people who like GUI's and
'structured programming, (such as Nicklaus Wirth, the inventor of
PASCAL)'

GUI's ruined computing, it was an arcane art up till Windows
3.11...............(starts to ramble on about punched card readers,
hard sectored 8 inch floppies and MINIMAC running on a DEC 11/750)

:-P


--
guestfromhell
------------------------------------------------------------------------
guestfromhell's Profile: http://www.iamnotageek.com/member.php?userid=12490
View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041

Pegasus \(MVP\)
07-10-2005, 12:55 AM
You need to be a little more careful with your code, especially
if you want to do "Sophisticated copying" (your Subject line).
I wrote this:

/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"

There are two obvious problems with your code:
- You shifted the first quote to the beginning of the line. Makes no sense
whatsoever!
- You quote a .bmp file after the exclude switch. On several previous
occasions in this thread it was pointed out that the file after the
/exclude switch must be a text file containing a list of files to be
excluded. It cannot be a .bmp file!


"RJB" <notpublic@aol.com> wrote in message
news:SPpne.8594$Fb.2545@trndny07...
> STILL a "Can't read file \\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>
> I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
> copies everything.
>
> Also, I tried the line with an
> "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of my
> dog - and still got the "Can't read file ...grace.bmp"
>
> So, it appears to be something it's not liking about "Exclude"?
>
> Arggggghhhhh!
>
>
>
>
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
> > With your "path" command you wrecked your existing path! The
> > correct way would be to type this:
> >
> > path %path%;\\SourceDrive\ShareDocs.
> >
> > However . . . adding SourceDrive\ShareDocs to the path makes no
> > sense, because SourceDrive\ShareDocs contains no executable
> > programs. The path is used to locate executable programs, not data
> > files.
> >
> > Here is what you should type:
> >
> > xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
> > /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
> >
> > This is all one long line. Note the "/y" switch, the trailing backslash
> > after "c:\Receive\", and the sets of double quotes. Depending on
> > your actual names, they could be essential.
> >
> >
> > "RJB" <notpublic@aol.com> wrote in message
> > news:qg5ne.5780$Lb.1073@trndny05...
> >> I added
> >> PATH \\SOURCEDRIVE\SHAREDDOCS
> >>
> >> And now get
> >> 'xcopy' is not recognized as an internal or external command,
> >> operable program or batch file
> >>
> >> I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
> >>
> >> btw, here is the full command in my batch file:
> >>
> >> XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
C:\RECEIVE
> >>
> >> My goal is to take all of the files (save the five listed in
> >> "dontcopy.txt"!) and copy them from a subdirectory called "Mailroom" on
> >> my
> >> server to a subdirectory called "Receive" on my laptop.
> >>
> >> (The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
> >>
> >>
> >> Thanks,
> >>
> >>
> >>
> >> "Bob I" <birelan@yahoo.com> wrote in message
> >> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
> >> > From the help
> >> > " /EXCLUDE:file1[+file2][+file3]...
> >> > Specifies a list of files containing strings. Each string should be
in
> > a
> >> > separate line in the files. When any of the strings match any part
of
> > the
> >> > absolute path of the file to be copied, that file will be excluded
from
> >> > being copied. For example, specifying a string like \obj\ or .obj
will
> >> > exclude all files underneath the directory obj or all files with the
> > .obj
> >> > extension respectively."
> >> >
> >> > So
> >> > /EXCLUDE:dontcopy.txt
> >> > NOT
> >> > /EXCLUDE dontcopy.txt
> >> >
> >> > Since where you put the file resulted in "can't read xxx", I suggest
> >> > putting "dontcopy.txt" in a directory that is listed in the PATH
> > listing.
> >> >
> >> > RJB wrote:
> >> >
> >> >> It's all listed in the screens above
> >> >>
> >> >> The donotcopy.txt contains a list - one per line - of each exclded
> > file.
> >> >>
> >> >> The long and short is
> >> >>
> >> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
> >> >> \\receivingpath\subdirectory
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> >> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
> >> >>
> >> >>>Let's see your precise command, and the contents of the
> >> >>>exclude file.
> >> >>>
> >> >>>
> >> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
> >> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
> >> >>>
> >> >>>>I've tried every permutation I can think of, and the results I get
> > are:
> >> >>>> Can't read file: XXX
> >> >>>>
> >> >>>> 0 File(s) copied
> >> >>>>
> >> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
> >> >>>>
> >> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
> >> >>>>
> >> >>>>Also, if I just try to exclude file(s) by name - a la
> > /EXCLUDE:ABC*.fil,
> >> >>>>I
> >> >>>>get the same result...
> >> >>>>Can't read file: ABC*.fil
> >> >>>>
> >> >>>>0 File(s) copied
> >> >>>>
> >> >>>>What the heck is going on???
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>>"Bob I" wrote:
> >> >>>>
> >> >>>>
> >> >>>>>BINGO! We have a Winner! :-) :-)
> >> >>>>>
> >> >>>>>RJB wrote:
> >> >>>>>
> >> >>>>>
> >> >>>>>>At the risk of being redundantly monotonous and obtuse:
> >> >>>>>>
> >> >>>>>>1) Create a notepad file
> >> >>>>>>2) In the file, type:
> >> >>>>>>ABC Jackson.fil
> >> >>>>>>ABC Smith.fil
> >> >>>>>>ABC Alias.fil
> >> >>>>>>ABC Lost.fil
> >> >>>>>>ABC Polar.fil
> >> >>>>>>3) Save it as "filelist.txt"
> >> >>>>>>4) In the xcopy command,
> >> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> >> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> >> >>>>>>
> >> >>>>>>Close?
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>"Bob I" wrote:
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>>Inline,
> >> >>>>>>>
> >> >>>>>>>RJB wrote:
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice cream
> >> >>>
> >> >>>headache.
> >> >>>
> >> >>>>>>>>I still don't know if I get the "file listing" info...
> >> >>>>>>>
> >> >>>>>>>>From your initial post, it seems as if I am creating a file -
> > called
> >> >>>
> >> >>>"file1"
> >> >>>
> >> >>>>>>>>- and in that file it includes a list of excluded files.
> >> >>>>>>>
> >> >>>>>>>CORRECT
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>>But I probably just want to do
> >> >>>>>>>>/EXCLUDE ABC*.fil
> >> >>>>>>>
> >> >>>>>>>Wrong, should be like this
> >> >>>>>>>
> >> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
> >> >>>>>>>
> >> >>>>>>>FILELIST.TXT contents are ABC*.fil
> >> >>>>>>>one entry per line, you may have to experiment with it a bit.
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>>Which is what your most recent post says. Right?
> >> >>>>>>>
> >> >>>>>>>nope.
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>>Anyway, I think I have enough info to experiment with.
> >> >>>>>>>>
> >> >>>>>>>>Thanks,
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>
> >> >>>
> >> >>
> >> >>
> >> >
> >>
> >>
> >
> >
>
>

Pegasus \(MVP\)
07-10-2005, 12:55 AM
Your reply contains several errors and misconceptions - see below.


"guestfromhell" <guestfromhell.1pyx0r@no-mx.forums.iamnotageek.com> wrote in
message news:guestfromhell.1pyx0r@no-mx.forums.iamnotageek.com...
>
> theres a lot of doublethink in these replies. doing 'xcopy /exclude
> abc*.fil 'is the same as copying them somewhere else then doin 'delete
> abc*.fil' ,and a lot simpler.......easier to delete the one u dont want
> rather than copy the ones u do want.................

No it is NOT the same. The /Exclude switch ensures that the files
do NOT get copied. You can easily test this, by issuing a copy
command that would overfill a floppy disk without the /exclude
switch. Your own method (copy & delete) would overfill the
floppy disk!


> DOS isnt sophisticated
There is no DOS under Windows. DOS is an operating system
as is Unix. It's the Command Prompt you're referring to,
and it is far more sophisticated than you would guess. If you
do not believe me, please explain what the following two lines
of code do, and why:
echo %date:~0,3%
echo %time::=-%

> its a programmers o/s
You probably mean "it's a programmer's o/s", with these
pesky apostrophes. But still, what you say is correct.

> and tends not to pander
> to what became known a 'Quiche Eaters' (people who like GUI's and
> 'structured programming, (such as Nicklaus Wirth, the inventor of
> PASCAL)'
GUIs and structured programming have nothing in common.
Furthermore, the word "GUIs" requires no apostrophe, same as
"two dogs" requires no apostrophy, because both are plurals.

> GUI's ruined computing
GUIs (note: no apostrophe!) made computing accessible to
the masses. It's what made the Apple so popular, until Microsoft
pulled even.

>, it was an arcane art up till Windows
> 3.11...............(starts to ramble on about punched card readers,
> hard sectored 8 inch floppies and MINIMAC running on a DEC 11/750)
>
> :-P

RJB
07-10-2005, 12:56 AM
Thanks. The .bmp attempt was to test if the exclude command was working, and
something was wrong with the .txt file setup.

(I thought if I excluded ONE file, then I would prove that /EXCLUDE was
working... And the .txt file was the problem. I didn't realize EXCLUDE MUST
be a .txt file... I thought that was only to exclude a series of files...
For just one file of any kind, I presumed you could exclude that. Do you
understand what I was trying?)

As you can see from my first line in this reply, I am still getting the
error... "Can't read file".

And the quotes were quotes meaning, "Hey, everything between the quotes is
what I typed for a command". I thought I only needed quotation marks on the
actual command line if I was using the 'long' file and path names from
Windows rather than the traditional DOS-tastic 8 character path name.

So I am still where I started.

(And I don't want to copy everything and delete. Eventually, there will be
files in the source and destination directories that are different, but will
have the same name! THOSE are the very files I need to exclude from copying!

I think what I may do is:

MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
Copy \\SOURCE\*.*
MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE

and call it a day!




"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
> You need to be a little more careful with your code, especially
> if you want to do "Sophisticated copying" (your Subject line).
> I wrote this:
>
> /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
> "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>
> There are two obvious problems with your code:
> - You shifted the first quote to the beginning of the line. Makes no sense
> whatsoever!
> - You quote a .bmp file after the exclude switch. On several previous
> occasions in this thread it was pointed out that the file after the
> /exclude switch must be a text file containing a list of files to be
> excluded. It cannot be a .bmp file!
>
>
> "RJB" <notpublic@aol.com> wrote in message
> news:SPpne.8594$Fb.2545@trndny07...
>> STILL a "Can't read file \\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>>
>> I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
>> copies everything.
>>
>> Also, I tried the line with an
>> "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of my
>> dog - and still got the "Can't read file ...grace.bmp"
>>
>> So, it appears to be something it's not liking about "Exclude"?
>>
>> Arggggghhhhh!
>>
>>
>>
>>
>>
>>
>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>> > With your "path" command you wrecked your existing path! The
>> > correct way would be to type this:
>> >
>> > path %path%;\\SourceDrive\ShareDocs.
>> >
>> > However . . . adding SourceDrive\ShareDocs to the path makes no
>> > sense, because SourceDrive\ShareDocs contains no executable
>> > programs. The path is used to locate executable programs, not data
>> > files.
>> >
>> > Here is what you should type:
>> >
>> > xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>> > /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>> >
>> > This is all one long line. Note the "/y" switch, the trailing backslash
>> > after "c:\Receive\", and the sets of double quotes. Depending on
>> > your actual names, they could be essential.
>> >
>> >
>> > "RJB" <notpublic@aol.com> wrote in message
>> > news:qg5ne.5780$Lb.1073@trndny05...
>> >> I added
>> >> PATH \\SOURCEDRIVE\SHAREDDOCS
>> >>
>> >> And now get
>> >> 'xcopy' is not recognized as an internal or external command,
>> >> operable program or batch file
>> >>
>> >> I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>> >>
>> >> btw, here is the full command in my batch file:
>> >>
>> >> XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
> C:\RECEIVE
>> >>
>> >> My goal is to take all of the files (save the five listed in
>> >> "dontcopy.txt"!) and copy them from a subdirectory called "Mailroom"
>> >> on
>> >> my
>> >> server to a subdirectory called "Receive" on my laptop.
>> >>
>> >> (The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>> >>
>> >>
>> >> Thanks,
>> >>
>> >>
>> >>
>> >> "Bob I" <birelan@yahoo.com> wrote in message
>> >> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>> >> > From the help
>> >> > " /EXCLUDE:file1[+file2][+file3]...
>> >> > Specifies a list of files containing strings. Each string should be
> in
>> > a
>> >> > separate line in the files. When any of the strings match any part
> of
>> > the
>> >> > absolute path of the file to be copied, that file will be excluded
> from
>> >> > being copied. For example, specifying a string like \obj\ or .obj
> will
>> >> > exclude all files underneath the directory obj or all files with the
>> > .obj
>> >> > extension respectively."
>> >> >
>> >> > So
>> >> > /EXCLUDE:dontcopy.txt
>> >> > NOT
>> >> > /EXCLUDE dontcopy.txt
>> >> >
>> >> > Since where you put the file resulted in "can't read xxx", I suggest
>> >> > putting "dontcopy.txt" in a directory that is listed in the PATH
>> > listing.
>> >> >
>> >> > RJB wrote:
>> >> >
>> >> >> It's all listed in the screens above
>> >> >>
>> >> >> The donotcopy.txt contains a list - one per line - of each exclded
>> > file.
>> >> >>
>> >> >> The long and short is
>> >> >>
>> >> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>> >> >> \\receivingpath\subdirectory
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> >> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>> >> >>
>> >> >>>Let's see your precise command, and the contents of the
>> >> >>>exclude file.
>> >> >>>
>> >> >>>
>> >> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>> >> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>> >> >>>
>> >> >>>>I've tried every permutation I can think of, and the results I get
>> > are:
>> >> >>>> Can't read file: XXX
>> >> >>>>
>> >> >>>> 0 File(s) copied
>> >> >>>>
>> >> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
>> >> >>>>
>> >> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>> >> >>>>
>> >> >>>>Also, if I just try to exclude file(s) by name - a la
>> > /EXCLUDE:ABC*.fil,
>> >> >>>>I
>> >> >>>>get the same result...
>> >> >>>>Can't read file: ABC*.fil
>> >> >>>>
>> >> >>>>0 File(s) copied
>> >> >>>>
>> >> >>>>What the heck is going on???
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>>"Bob I" wrote:
>> >> >>>>
>> >> >>>>
>> >> >>>>>BINGO! We have a Winner! :-) :-)
>> >> >>>>>
>> >> >>>>>RJB wrote:
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>>At the risk of being redundantly monotonous and obtuse:
>> >> >>>>>>
>> >> >>>>>>1) Create a notepad file
>> >> >>>>>>2) In the file, type:
>> >> >>>>>>ABC Jackson.fil
>> >> >>>>>>ABC Smith.fil
>> >> >>>>>>ABC Alias.fil
>> >> >>>>>>ABC Lost.fil
>> >> >>>>>>ABC Polar.fil
>> >> >>>>>>3) Save it as "filelist.txt"
>> >> >>>>>>4) In the xcopy command,
>> >> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>> >> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>> >> >>>>>>
>> >> >>>>>>Close?
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>>"Bob I" wrote:
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>>>Inline,
>> >> >>>>>>>
>> >> >>>>>>>RJB wrote:
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>> >> >>>>>>>>cream
>> >> >>>
>> >> >>>headache.
>> >> >>>
>> >> >>>>>>>>I still don't know if I get the "file listing" info...
>> >> >>>>>>>
>> >> >>>>>>>>From your initial post, it seems as if I am creating a file -
>> > called
>> >> >>>
>> >> >>>"file1"
>> >> >>>
>> >> >>>>>>>>- and in that file it includes a list of excluded files.
>> >> >>>>>>>
>> >> >>>>>>>CORRECT
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>>But I probably just want to do
>> >> >>>>>>>>/EXCLUDE ABC*.fil
>> >> >>>>>>>
>> >> >>>>>>>Wrong, should be like this
>> >> >>>>>>>
>> >> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>> >> >>>>>>>
>> >> >>>>>>>FILELIST.TXT contents are ABC*.fil
>> >> >>>>>>>one entry per line, you may have to experiment with it a bit.
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>>Which is what your most recent post says. Right?
>> >> >>>>>>>
>> >> >>>>>>>nope.
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>>Anyway, I think I have enough info to experiment with.
>> >> >>>>>>>>
>> >> >>>>>>>>Thanks,
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>

Pegasus \(MVP\)
07-10-2005, 12:56 AM
This is a curious thread in that we keep running into two types
of problems:
- You quote generic commands that have some character
misplaced (first a colon, then a double quote), and then
you say that this was not the real command anyway.
- In spite of several encouragements, you never show us the
real command you're using.

Your latest reply is no exception: Again you do not show us what
you've done - you only report the problems.

I might add that your task is utterly trivial. I can be solved in less
than a minute by someone who pays attention to standard batch
file conventions.

Unless you agree to show us what you have written (i.e. the
verbatim contents of your batch file plus the contents of your
"exclude" file), I will stop responding in this thread. Its length
is badly out of proportion with the triviality of the problem.
There is nothing sophisticated about it!



"RJB" <notpublic@aol.com> wrote in message
news:W_Ene.8790$Fb.2500@trndny07...
> Thanks. The .bmp attempt was to test if the exclude command was working,
and
> something was wrong with the .txt file setup.
>
> (I thought if I excluded ONE file, then I would prove that /EXCLUDE was
> working... And the .txt file was the problem. I didn't realize EXCLUDE
MUST
> be a .txt file... I thought that was only to exclude a series of files...
> For just one file of any kind, I presumed you could exclude that. Do you
> understand what I was trying?)
>
> As you can see from my first line in this reply, I am still getting the
> error... "Can't read file".
>
> And the quotes were quotes meaning, "Hey, everything between the quotes is
> what I typed for a command". I thought I only needed quotation marks on
the
> actual command line if I was using the 'long' file and path names from
> Windows rather than the traditional DOS-tastic 8 character path name.
>
> So I am still where I started.
>
> (And I don't want to copy everything and delete. Eventually, there will be
> files in the source and destination directories that are different, but
will
> have the same name! THOSE are the very files I need to exclude from
copying!
>
> I think what I may do is:
>
> MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
> Copy \\SOURCE\*.*
> MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>
> and call it a day!
>
>
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
> > You need to be a little more careful with your code, especially
> > if you want to do "Sophisticated copying" (your Subject line).
> > I wrote this:
> >
> > /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
> > "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
> >
> > There are two obvious problems with your code:
> > - You shifted the first quote to the beginning of the line. Makes no
sense
> > whatsoever!
> > - You quote a .bmp file after the exclude switch. On several previous
> > occasions in this thread it was pointed out that the file after the
> > /exclude switch must be a text file containing a list of files to be
> > excluded. It cannot be a .bmp file!
> >
> >
> > "RJB" <notpublic@aol.com> wrote in message
> > news:SPpne.8594$Fb.2545@trndny07...
> >> STILL a "Can't read file
\\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
> >>
> >> I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
> >> copies everything.
> >>
> >> Also, I tried the line with an
> >> "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of
my
> >> dog - and still got the "Can't read file ...grace.bmp"
> >>
> >> So, it appears to be something it's not liking about "Exclude"?
> >>
> >> Arggggghhhhh!
> >>
> >>
> >>
> >>
> >>
> >>
> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> >> news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
> >> > With your "path" command you wrecked your existing path! The
> >> > correct way would be to type this:
> >> >
> >> > path %path%;\\SourceDrive\ShareDocs.
> >> >
> >> > However . . . adding SourceDrive\ShareDocs to the path makes no
> >> > sense, because SourceDrive\ShareDocs contains no executable
> >> > programs. The path is used to locate executable programs, not data
> >> > files.
> >> >
> >> > Here is what you should type:
> >> >
> >> > xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
> >> > /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
> >> >
> >> > This is all one long line. Note the "/y" switch, the trailing
backslash
> >> > after "c:\Receive\", and the sets of double quotes. Depending on
> >> > your actual names, they could be essential.
> >> >
> >> >
> >> > "RJB" <notpublic@aol.com> wrote in message
> >> > news:qg5ne.5780$Lb.1073@trndny05...
> >> >> I added
> >> >> PATH \\SOURCEDRIVE\SHAREDDOCS
> >> >>
> >> >> And now get
> >> >> 'xcopy' is not recognized as an internal or external command,
> >> >> operable program or batch file
> >> >>
> >> >> I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
> >> >>
> >> >> btw, here is the full command in my batch file:
> >> >>
> >> >> XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
> > C:\RECEIVE
> >> >>
> >> >> My goal is to take all of the files (save the five listed in
> >> >> "dontcopy.txt"!) and copy them from a subdirectory called "Mailroom"
> >> >> on
> >> >> my
> >> >> server to a subdirectory called "Receive" on my laptop.
> >> >>
> >> >> (The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
> >> >>
> >> >>
> >> >> Thanks,
> >> >>
> >> >>
> >> >>
> >> >> "Bob I" <birelan@yahoo.com> wrote in message
> >> >> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
> >> >> > From the help
> >> >> > " /EXCLUDE:file1[+file2][+file3]...
> >> >> > Specifies a list of files containing strings. Each string should
be
> > in
> >> > a
> >> >> > separate line in the files. When any of the strings match any
part
> > of
> >> > the
> >> >> > absolute path of the file to be copied, that file will be excluded
> > from
> >> >> > being copied. For example, specifying a string like \obj\ or .obj
> > will
> >> >> > exclude all files underneath the directory obj or all files with
the
> >> > .obj
> >> >> > extension respectively."
> >> >> >
> >> >> > So
> >> >> > /EXCLUDE:dontcopy.txt
> >> >> > NOT
> >> >> > /EXCLUDE dontcopy.txt
> >> >> >
> >> >> > Since where you put the file resulted in "can't read xxx", I
suggest
> >> >> > putting "dontcopy.txt" in a directory that is listed in the PATH
> >> > listing.
> >> >> >
> >> >> > RJB wrote:
> >> >> >
> >> >> >> It's all listed in the screens above
> >> >> >>
> >> >> >> The donotcopy.txt contains a list - one per line - of each
exclded
> >> > file.
> >> >> >>
> >> >> >> The long and short is
> >> >> >>
> >> >> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
> >> >> >> \\receivingpath\subdirectory
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> >> >> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
> >> >> >>
> >> >> >>>Let's see your precise command, and the contents of the
> >> >> >>>exclude file.
> >> >> >>>
> >> >> >>>
> >> >> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
> >> >> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
> >> >> >>>
> >> >> >>>>I've tried every permutation I can think of, and the results I
get
> >> > are:
> >> >> >>>> Can't read file: XXX
> >> >> >>>>
> >> >> >>>> 0 File(s) copied
> >> >> >>>>
> >> >> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
> >> >> >>>>
> >> >> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
> >> >> >>>>
> >> >> >>>>Also, if I just try to exclude file(s) by name - a la
> >> > /EXCLUDE:ABC*.fil,
> >> >> >>>>I
> >> >> >>>>get the same result...
> >> >> >>>>Can't read file: ABC*.fil
> >> >> >>>>
> >> >> >>>>0 File(s) copied
> >> >> >>>>
> >> >> >>>>What the heck is going on???
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>"Bob I" wrote:
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>>BINGO! We have a Winner! :-) :-)
> >> >> >>>>>
> >> >> >>>>>RJB wrote:
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>>At the risk of being redundantly monotonous and obtuse:
> >> >> >>>>>>
> >> >> >>>>>>1) Create a notepad file
> >> >> >>>>>>2) In the file, type:
> >> >> >>>>>>ABC Jackson.fil
> >> >> >>>>>>ABC Smith.fil
> >> >> >>>>>>ABC Alias.fil
> >> >> >>>>>>ABC Lost.fil
> >> >> >>>>>>ABC Polar.fil
> >> >> >>>>>>3) Save it as "filelist.txt"
> >> >> >>>>>>4) In the xcopy command,
> >> >> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
> >> >> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
> >> >> >>>>>>
> >> >> >>>>>>Close?
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>>"Bob I" wrote:
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>>>Inline,
> >> >> >>>>>>>
> >> >> >>>>>>>RJB wrote:
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
> >> >> >>>>>>>>cream
> >> >> >>>
> >> >> >>>headache.
> >> >> >>>
> >> >> >>>>>>>>I still don't know if I get the "file listing" info...
> >> >> >>>>>>>
> >> >> >>>>>>>>From your initial post, it seems as if I am creating a
file -
> >> > called
> >> >> >>>
> >> >> >>>"file1"
> >> >> >>>
> >> >> >>>>>>>>- and in that file it includes a list of excluded files.
> >> >> >>>>>>>
> >> >> >>>>>>>CORRECT
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>>But I probably just want to do
> >> >> >>>>>>>>/EXCLUDE ABC*.fil
> >> >> >>>>>>>
> >> >> >>>>>>>Wrong, should be like this
> >> >> >>>>>>>
> >> >> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
> >> >> >>>>>>>
> >> >> >>>>>>>FILELIST.TXT contents are ABC*.fil
> >> >> >>>>>>>one entry per line, you may have to experiment with it a bit.
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>>Which is what your most recent post says. Right?
> >> >> >>>>>>>
> >> >> >>>>>>>nope.
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>>Anyway, I think I have enough info to experiment with.
> >> >> >>>>>>>>
> >> >> >>>>>>>>Thanks,
> >> >> >>>>>>>>
> >> >> >>>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>
> >> >> >>>
> >> >> >>
> >> >> >>
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>

RJB
07-10-2005, 12:56 AM
I don't want to copy everything and delete. Eventually, there will be
files in the source and destination directories that are different, but will
have the same name! THOSE are the very files I need to exclude from copying!



"guestfromhell" <guestfromhell.1pyx0r@no-mx.forums.iamnotageek.com> wrote in
message news:guestfromhell.1pyx0r@no-mx.forums.iamnotageek.com...
>
> theres a lot of doublethink in these replies. doing 'xcopy /exclude
> abc*.fil 'is the same as copying them somewhere else then doin 'delete
> abc*.fil' ,and a lot simpler.......easier to delete the one u dont want
> rather than copy the ones u do want.................
>
> DOS isnt sophisticated, its a programmers o/s, and tends not to pander
> to what became known a 'Quiche Eaters' (people who like GUI's and
> 'structured programming, (such as Nicklaus Wirth, the inventor of
> PASCAL)'
>
> GUI's ruined computing, it was an arcane art up till Windows
> 3.11...............(starts to ramble on about punched card readers,
> hard sectored 8 inch floppies and MINIMAC running on a DEC 11/750)
>
> :-P
>
>
> --
> guestfromhell
> ------------------------------------------------------------------------
> guestfromhell's Profile:
> http://www.iamnotageek.com/member.php?userid=12490
> View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041
>

RJB
07-10-2005, 12:56 AM
OK, I know you're trying to be helpful, but it's getting kind of tough.

Trust me that I have spent hours - in batch file and just typing commands in
at the command prompt - and no matter what I do, I am getting the "can't
read" message.

I am running in command prompt for two reasons: one is, I am tired of
opening the file, typing it, and saving it, when I can just run directly in
cmd.exe. Second, I don't get error messages when I run the batch. It either
works or it doesn't, and then the batch file closes. At least when I run
cmd.exe, I can read each error message as I go.

I HAVE shown you the exact command I am attempting to run, to the best of my
ability. Since I have no way of copying from the command prompt to my web
browser, I must retype the commands. I am sorry for the few typos in the
translation. And, I have discovered that if I post in newsgroups directly,
my spell check has flubbed some things as well.

From what I have found in xcopy /?, it tells me that the /EXCLUDE switch
should work with ANY file, not just text files.

If it could be solved in less than a minute, it would have been. I am sorry
if turning to Microsoft help is not the answer. It was my first line of
defense.

I have tried to answer every single question you have asked as carefuly and
as completely as possible. Again, my apologies for not being able to
anticipate the unasked and give you full open kimono.

The only difference between what I have continually typed and what is on my
command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
really feel it was necessary to type that over and over again, when I
presumed we could understand \\SOURCEPATH\

I do appreciate your trying to help. I have tried everything you have said,
along with every other permutation I could think of.

**** No matter what I do, I get "Can't read file."

It ain't trivial to me.


"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:uVdpUS4ZFHA.3364@TK2MSFTNGP09.phx.gbl...
> This is a curious thread in that we keep running into two types
> of problems:
> - You quote generic commands that have some character
> misplaced (first a colon, then a double quote), and then
> you say that this was not the real command anyway.
> - In spite of several encouragements, you never show us the
> real command you're using.
>
> Your latest reply is no exception: Again you do not show us what
> you've done - you only report the problems.
>
> I might add that your task is utterly trivial. I can be solved in less
> than a minute by someone who pays attention to standard batch
> file conventions.
>
> Unless you agree to show us what you have written (i.e. the
> verbatim contents of your batch file plus the contents of your
> "exclude" file), I will stop responding in this thread. Its length
> is badly out of proportion with the triviality of the problem.
> There is nothing sophisticated about it!
>
>
>
> "RJB" <notpublic@aol.com> wrote in message
> news:W_Ene.8790$Fb.2500@trndny07...
>> Thanks. The .bmp attempt was to test if the exclude command was working,
> and
>> something was wrong with the .txt file setup.
>>
>> (I thought if I excluded ONE file, then I would prove that /EXCLUDE was
>> working... And the .txt file was the problem. I didn't realize EXCLUDE
> MUST
>> be a .txt file... I thought that was only to exclude a series of files...
>> For just one file of any kind, I presumed you could exclude that. Do you
>> understand what I was trying?)
>>
>> As you can see from my first line in this reply, I am still getting the
>> error... "Can't read file".
>>
>> And the quotes were quotes meaning, "Hey, everything between the quotes
>> is
>> what I typed for a command". I thought I only needed quotation marks on
> the
>> actual command line if I was using the 'long' file and path names from
>> Windows rather than the traditional DOS-tastic 8 character path name.
>>
>> So I am still where I started.
>>
>> (And I don't want to copy everything and delete. Eventually, there will
>> be
>> files in the source and destination directories that are different, but
> will
>> have the same name! THOSE are the very files I need to exclude from
> copying!
>>
>> I think what I may do is:
>>
>> MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
>> Copy \\SOURCE\*.*
>> MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>>
>> and call it a day!
>>
>>
>>
>>
>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
>> > You need to be a little more careful with your code, especially
>> > if you want to do "Sophisticated copying" (your Subject line).
>> > I wrote this:
>> >
>> > /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
>> > "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>> >
>> > There are two obvious problems with your code:
>> > - You shifted the first quote to the beginning of the line. Makes no
> sense
>> > whatsoever!
>> > - You quote a .bmp file after the exclude switch. On several previous
>> > occasions in this thread it was pointed out that the file after the
>> > /exclude switch must be a text file containing a list of files to be
>> > excluded. It cannot be a .bmp file!
>> >
>> >
>> > "RJB" <notpublic@aol.com> wrote in message
>> > news:SPpne.8594$Fb.2545@trndny07...
>> >> STILL a "Can't read file
> \\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>> >>
>> >> I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
>> >> copies everything.
>> >>
>> >> Also, I tried the line with an
>> >> "/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of
> my
>> >> dog - and still got the "Can't read file ...grace.bmp"
>> >>
>> >> So, it appears to be something it's not liking about "Exclude"?
>> >>
>> >> Arggggghhhhh!
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> >> news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>> >> > With your "path" command you wrecked your existing path! The
>> >> > correct way would be to type this:
>> >> >
>> >> > path %path%;\\SourceDrive\ShareDocs.
>> >> >
>> >> > However . . . adding SourceDrive\ShareDocs to the path makes no
>> >> > sense, because SourceDrive\ShareDocs contains no executable
>> >> > programs. The path is used to locate executable programs, not data
>> >> > files.
>> >> >
>> >> > Here is what you should type:
>> >> >
>> >> > xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>> >> > /EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>> >> >
>> >> > This is all one long line. Note the "/y" switch, the trailing
> backslash
>> >> > after "c:\Receive\", and the sets of double quotes. Depending on
>> >> > your actual names, they could be essential.
>> >> >
>> >> >
>> >> > "RJB" <notpublic@aol.com> wrote in message
>> >> > news:qg5ne.5780$Lb.1073@trndny05...
>> >> >> I added
>> >> >> PATH \\SOURCEDRIVE\SHAREDDOCS
>> >> >>
>> >> >> And now get
>> >> >> 'xcopy' is not recognized as an internal or external command,
>> >> >> operable program or batch file
>> >> >>
>> >> >> I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>> >> >>
>> >> >> btw, here is the full command in my batch file:
>> >> >>
>> >> >> XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
>> > C:\RECEIVE
>> >> >>
>> >> >> My goal is to take all of the files (save the five listed in
>> >> >> "dontcopy.txt"!) and copy them from a subdirectory called
>> >> >> "Mailroom"
>> >> >> on
>> >> >> my
>> >> >> server to a subdirectory called "Receive" on my laptop.
>> >> >>
>> >> >> (The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>> >> >>
>> >> >>
>> >> >> Thanks,
>> >> >>
>> >> >>
>> >> >>
>> >> >> "Bob I" <birelan@yahoo.com> wrote in message
>> >> >> news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>> >> >> > From the help
>> >> >> > " /EXCLUDE:file1[+file2][+file3]...
>> >> >> > Specifies a list of files containing strings. Each string should
> be
>> > in
>> >> > a
>> >> >> > separate line in the files. When any of the strings match any
> part
>> > of
>> >> > the
>> >> >> > absolute path of the file to be copied, that file will be
>> >> >> > excluded
>> > from
>> >> >> > being copied. For example, specifying a string like \obj\ or
>> >> >> > .obj
>> > will
>> >> >> > exclude all files underneath the directory obj or all files with
> the
>> >> > .obj
>> >> >> > extension respectively."
>> >> >> >
>> >> >> > So
>> >> >> > /EXCLUDE:dontcopy.txt
>> >> >> > NOT
>> >> >> > /EXCLUDE dontcopy.txt
>> >> >> >
>> >> >> > Since where you put the file resulted in "can't read xxx", I
> suggest
>> >> >> > putting "dontcopy.txt" in a directory that is listed in the PATH
>> >> > listing.
>> >> >> >
>> >> >> > RJB wrote:
>> >> >> >
>> >> >> >> It's all listed in the screens above
>> >> >> >>
>> >> >> >> The donotcopy.txt contains a list - one per line - of each
> exclded
>> >> > file.
>> >> >> >>
>> >> >> >> The long and short is
>> >> >> >>
>> >> >> >> xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>> >> >> >> \\receivingpath\subdirectory
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> >> >> >> news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>> >> >> >>
>> >> >> >>>Let's see your precise command, and the contents of the
>> >> >> >>>exclude file.
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>> >> >> >>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>> >> >> >>>
>> >> >> >>>>I've tried every permutation I can think of, and the results I
> get
>> >> > are:
>> >> >> >>>> Can't read file: XXX
>> >> >> >>>>
>> >> >> >>>> 0 File(s) copied
>> >> >> >>>>
>> >> >> >>>>(where XXX is whatever file comes after the "/exclude:" switch.
>> >> >> >>>>
>> >> >> >>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>> >> >> >>>>
>> >> >> >>>>Also, if I just try to exclude file(s) by name - a la
>> >> > /EXCLUDE:ABC*.fil,
>> >> >> >>>>I
>> >> >> >>>>get the same result...
>> >> >> >>>>Can't read file: ABC*.fil
>> >> >> >>>>
>> >> >> >>>>0 File(s) copied
>> >> >> >>>>
>> >> >> >>>>What the heck is going on???
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>"Bob I" wrote:
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>>BINGO! We have a Winner! :-) :-)
>> >> >> >>>>>
>> >> >> >>>>>RJB wrote:
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>>>At the risk of being redundantly monotonous and obtuse:
>> >> >> >>>>>>
>> >> >> >>>>>>1) Create a notepad file
>> >> >> >>>>>>2) In the file, type:
>> >> >> >>>>>>ABC Jackson.fil
>> >> >> >>>>>>ABC Smith.fil
>> >> >> >>>>>>ABC Alias.fil
>> >> >> >>>>>>ABC Lost.fil
>> >> >> >>>>>>ABC Polar.fil
>> >> >> >>>>>>3) Save it as "filelist.txt"
>> >> >> >>>>>>4) In the xcopy command,
>> >> >> >>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>> >> >> >>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>> >> >> >>>>>>
>> >> >> >>>>>>Close?
>> >> >> >>>>>>
>> >> >> >>>>>>
>> >> >> >>>>>>"Bob I" wrote:
>> >> >> >>>>>>
>> >> >> >>>>>>
>> >> >> >>>>>>
>> >> >> >>>>>>>Inline,
>> >> >> >>>>>>>
>> >> >> >>>>>>>RJB wrote:
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>> >> >> >>>>>>>>cream
>> >> >> >>>
>> >> >> >>>headache.
>> >> >> >>>
>> >> >> >>>>>>>>I still don't know if I get the "file listing" info...
>> >> >> >>>>>>>
>> >> >> >>>>>>>>From your initial post, it seems as if I am creating a
> file -
>> >> > called
>> >> >> >>>
>> >> >> >>>"file1"
>> >> >> >>>
>> >> >> >>>>>>>>- and in that file it includes a list of excluded files.
>> >> >> >>>>>>>
>> >> >> >>>>>>>CORRECT
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>>But I probably just want to do
>> >> >> >>>>>>>>/EXCLUDE ABC*.fil
>> >> >> >>>>>>>
>> >> >> >>>>>>>Wrong, should be like this
>> >> >> >>>>>>>
>> >> >> >>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>> >> >> >>>>>>>
>> >> >> >>>>>>>FILELIST.TXT contents are ABC*.fil
>> >> >> >>>>>>>one entry per line, you may have to experiment with it a
>> >> >> >>>>>>>bit.
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>>Which is what your most recent post says. Right?
>> >> >> >>>>>>>
>> >> >> >>>>>>>nope.
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>>Anyway, I think I have enough info to experiment with.
>> >> >> >>>>>>>>
>> >> >> >>>>>>>>Thanks,
>> >> >> >>>>>>>>
>> >> >> >>>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>>>
>> >> >> >>>>>
>> >> >> >>>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>

Bob I
07-10-2005, 12:56 AM
Plain and simple. The "FILE"(dontcopy.txt) placed after /EXCLUDE MUST BE
A PLAIN TEXT FILE. Open NOTEPAD and put in the contents. The file types
called out or listed in "dontcopy.txt" can be any type of file there
ever was including unknown types because the only thing that is READ is
the "dontcopy.txt" file and it MUST BE plain text and ONE entry per
line. If you are using word or wordpad or wordperfect to make the
exclude file, DON'T. Use NOTEPAD and ONLY NOTEPAD. Remember XCOPY reads
the file containing the list of files to be excluded. If it's NOT PLAIN
TEXT, it's not going to work.

RJB wrote:

> OK, I know you're trying to be helpful, but it's getting kind of tough.
>
> Trust me that I have spent hours - in batch file and just typing commands in
> at the command prompt - and no matter what I do, I am getting the "can't
> read" message.
>
> I am running in command prompt for two reasons: one is, I am tired of
> opening the file, typing it, and saving it, when I can just run directly in
> cmd.exe. Second, I don't get error messages when I run the batch. It either
> works or it doesn't, and then the batch file closes. At least when I run
> cmd.exe, I can read each error message as I go.
>
> I HAVE shown you the exact command I am attempting to run, to the best of my
> ability. Since I have no way of copying from the command prompt to my web
> browser, I must retype the commands. I am sorry for the few typos in the
> translation. And, I have discovered that if I post in newsgroups directly,
> my spell check has flubbed some things as well.
>
> From what I have found in xcopy /?, it tells me that the /EXCLUDE switch
> should work with ANY file, not just text files.
>
> If it could be solved in less than a minute, it would have been. I am sorry
> if turning to Microsoft help is not the answer. It was my first line of
> defense.
>
> I have tried to answer every single question you have asked as carefuly and
> as completely as possible. Again, my apologies for not being able to
> anticipate the unasked and give you full open kimono.
>
> The only difference between what I have continually typed and what is on my
> command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
> really feel it was necessary to type that over and over again, when I
> presumed we could understand \\SOURCEPATH\
>
> I do appreciate your trying to help. I have tried everything you have said,
> along with every other permutation I could think of.
>
> **** No matter what I do, I get "Can't read file."
>
> It ain't trivial to me.
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:uVdpUS4ZFHA.3364@TK2MSFTNGP09.phx.gbl...
>
>>This is a curious thread in that we keep running into two types
>>of problems:
>>- You quote generic commands that have some character
>> misplaced (first a colon, then a double quote), and then
>> you say that this was not the real command anyway.
>>- In spite of several encouragements, you never show us the
>> real command you're using.
>>
>>Your latest reply is no exception: Again you do not show us what
>>you've done - you only report the problems.
>>
>>I might add that your task is utterly trivial. I can be solved in less
>>than a minute by someone who pays attention to standard batch
>>file conventions.
>>
>>Unless you agree to show us what you have written (i.e. the
>>verbatim contents of your batch file plus the contents of your
>>"exclude" file), I will stop responding in this thread. Its length
>>is badly out of proportion with the triviality of the problem.
>>There is nothing sophisticated about it!
>>
>>
>>
>>"RJB" <notpublic@aol.com> wrote in message
>>news:W_Ene.8790$Fb.2500@trndny07...
>>
>>>Thanks. The .bmp attempt was to test if the exclude command was working,
>>
>>and
>>
>>>something was wrong with the .txt file setup.
>>>
>>>(I thought if I excluded ONE file, then I would prove that /EXCLUDE was
>>>working... And the .txt file was the problem. I didn't realize EXCLUDE
>>
>>MUST
>>
>>>be a .txt file... I thought that was only to exclude a series of files...
>>>For just one file of any kind, I presumed you could exclude that. Do you
>>>understand what I was trying?)
>>>
>>>As you can see from my first line in this reply, I am still getting the
>>>error... "Can't read file".
>>>
>>>And the quotes were quotes meaning, "Hey, everything between the quotes
>>>is
>>>what I typed for a command". I thought I only needed quotation marks on
>>
>>the
>>
>>>actual command line if I was using the 'long' file and path names from
>>>Windows rather than the traditional DOS-tastic 8 character path name.
>>>
>>>So I am still where I started.
>>>
>>>(And I don't want to copy everything and delete. Eventually, there will
>>>be
>>>files in the source and destination directories that are different, but
>>
>>will
>>
>>>have the same name! THOSE are the very files I need to exclude from
>>
>>copying!
>>
>>>I think what I may do is:
>>>
>>>MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
>>>Copy \\SOURCE\*.*
>>>MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>>>
>>>and call it a day!
>>>
>>>
>>>
>>>
>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
>>>
>>>>You need to be a little more careful with your code, especially
>>>>if you want to do "Sophisticated copying" (your Subject line).
>>>>I wrote this:
>>>>
>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>>>>
>>>>There are two obvious problems with your code:
>>>>- You shifted the first quote to the beginning of the line. Makes no
>>
>>sense
>>
>>>>whatsoever!
>>>>- You quote a .bmp file after the exclude switch. On several previous
>>>>occasions in this thread it was pointed out that the file after the
>>>>/exclude switch must be a text file containing a list of files to be
>>>>excluded. It cannot be a .bmp file!
>>>>
>>>>
>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>news:SPpne.8594$Fb.2545@trndny07...
>>>>
>>>>>STILL a "Can't read file
>>
>>\\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>>
>>>>>I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
>>>>>copies everything.
>>>>>
>>>>>Also, I tried the line with an
>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of
>>
>>my
>>
>>>>>dog - and still got the "Can't read file ...grace.bmp"
>>>>>
>>>>>So, it appears to be something it's not liking about "Exclude"?
>>>>>
>>>>>Arggggghhhhh!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>>>>>
>>>>>>With your "path" command you wrecked your existing path! The
>>>>>>correct way would be to type this:
>>>>>>
>>>>>>path %path%;\\SourceDrive\ShareDocs.
>>>>>>
>>>>>>However . . . adding SourceDrive\ShareDocs to the path makes no
>>>>>>sense, because SourceDrive\ShareDocs contains no executable
>>>>>>programs. The path is used to locate executable programs, not data
>>>>>>files.
>>>>>>
>>>>>>Here is what you should type:
>>>>>>
>>>>>>xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>>>>>>
>>>>>>This is all one long line. Note the "/y" switch, the trailing
>>
>>backslash
>>
>>>>>>after "c:\Receive\", and the sets of double quotes. Depending on
>>>>>>your actual names, they could be essential.
>>>>>>
>>>>>>
>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>news:qg5ne.5780$Lb.1073@trndny05...
>>>>>>
>>>>>>>I added
>>>>>>>PATH \\SOURCEDRIVE\SHAREDDOCS
>>>>>>>
>>>>>>>And now get
>>>>>>> 'xcopy' is not recognized as an internal or external command,
>>>>>>> operable program or batch file
>>>>>>>
>>>>>>>I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>>>>>>>
>>>>>>>btw, here is the full command in my batch file:
>>>>>>>
>>>>>>>XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
>>>>
>>>>C:\RECEIVE
>>>>
>>>>>>>My goal is to take all of the files (save the five listed in
>>>>>>>"dontcopy.txt"!) and copy them from a subdirectory called
>>>>>>>"Mailroom"
>>>>>>>on
>>>>>>>my
>>>>>>>server to a subdirectory called "Receive" on my laptop.
>>>>>>>
>>>>>>>(The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>>>>>>>
>>>>>>>
>>>>>>>Thanks,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>"Bob I" <birelan@yahoo.com> wrote in message
>>>>>>>news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>>>>>>>
>>>>>>>>From the help
>>>>>>>>" /EXCLUDE:file1[+file2][+file3]...
>>>>>>>>Specifies a list of files containing strings. Each string should
>>
>>be
>>
>>>>in
>>>>
>>>>>>a
>>>>>>
>>>>>>>>separate line in the files. When any of the strings match any
>>
>>part
>>
>>>>of
>>>>
>>>>>>the
>>>>>>
>>>>>>>>absolute path of the file to be copied, that file will be
>>>>>>>>excluded
>>>>
>>>>from
>>>>
>>>>>>>>being copied. For example, specifying a string like \obj\ or
>>>>>>>>.obj
>>>>
>>>>will
>>>>
>>>>>>>>exclude all files underneath the directory obj or all files with
>>
>>the
>>
>>>>>>.obj
>>>>>>
>>>>>>>>extension respectively."
>>>>>>>>
>>>>>>>>So
>>>>>>>>/EXCLUDE:dontcopy.txt
>>>>>>>>NOT
>>>>>>>>/EXCLUDE dontcopy.txt
>>>>>>>>
>>>>>>>>Since where you put the file resulted in "can't read xxx", I
>>
>>suggest
>>
>>>>>>>>putting "dontcopy.txt" in a directory that is listed in the PATH
>>>>>>
>>>>>>listing.
>>>>>>
>>>>>>>>RJB wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>>It's all listed in the screens above
>>>>>>>>>
>>>>>>>>>The donotcopy.txt contains a list - one per line - of each
>>
>>exclded
>>
>>>>>>file.
>>>>>>
>>>>>>>>>The long and short is
>>>>>>>>>
>>>>>>>>>xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>>>>>>>>>\\receivingpath\subdirectory
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>>news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>Let's see your precise command, and the contents of the
>>>>>>>>>>exclude file.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>>>>>>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>I've tried every permutation I can think of, and the results I
>>
>>get
>>
>>>>>>are:
>>>>>>
>>>>>>>>>>>Can't read file: XXX
>>>>>>>>>>>
>>>>>>>>>>> 0 File(s) copied
>>>>>>>>>>>
>>>>>>>>>>>(where XXX is whatever file comes after the "/exclude:" switch.
>>>>>>>>>>>
>>>>>>>>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>>>>>>>>
>>>>>>>>>>>Also, if I just try to exclude file(s) by name - a la
>>>>>>
>>>>>>/EXCLUDE:ABC*.fil,
>>>>>>
>>>>>>>>>>>I
>>>>>>>>>>>get the same result...
>>>>>>>>>>>Can't read file: ABC*.fil
>>>>>>>>>>>
>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>
>>>>>>>>>>>What the heck is going on???
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>BINGO! We have a Winner! :-) :-)
>>>>>>>>>>>>
>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>>>>>>>>
>>>>>>>>>>>>>1) Create a notepad file
>>>>>>>>>>>>>2) In the file, type:
>>>>>>>>>>>>>ABC Jackson.fil
>>>>>>>>>>>>>ABC Smith.fil
>>>>>>>>>>>>>ABC Alias.fil
>>>>>>>>>>>>>ABC Lost.fil
>>>>>>>>>>>>>ABC Polar.fil
>>>>>>>>>>>>>3) Save it as "filelist.txt"
>>>>>>>>>>>>>4) In the xcopy command,
>>>>>>>>>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>>>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>>>>>>>>
>>>>>>>>>>>>>Close?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>Inline,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>>>>>>>>>>>>>>>cream
>>>>>>>>>>
>>>>>>>>>>headache.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>From your initial post, it seems as if I am creating a
>>
>>file -
>>
>>>>>>called
>>>>>>
>>>>>>>>>>"file1"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>CORRECT
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>But I probably just want to do
>>>>>>>>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Wrong, should be like this
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>>>>>>>>one entry per line, you may have to experiment with it a
>>>>>>>>>>>>>>bit.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>nope.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>

RJB
07-10-2005, 12:56 AM
Done that.

Done it three ways:

1) Listing each file on its own line
2) Listing each file, with its full path, on its own line
3) (What I'd prefer) Going back to my original examples, "ABC*.fil".

(Now, granted, they are not literally "ABC Jackson.fil" etc., but the file
names DO include proprietary information, and I can't post the actual file
names here. Suffice to say they all are the same extensions, and the ones I
wish to exclude ALL begin with the same three letters!)

And, to be avoid typos, I am highlighting the file, choosing Properties,
highlighting the file's name, COPYing it, and PASTEing it into the Notepad
file!

If I delete the /EXCLUDE switch, the whole subdirectory copies, so I know my
path is correct.

I continue to get "Can't read file:" \\G:\LEDBER\USERS\OPERATIONS\RJ_(My
last name)\SHAREDDOCS\MAILROOM\nocopylist.txt"" <=(I created a new Notepad
file and called it nocopylist.txt) (And for the rock and roll grammar patrol
folks, I KNOW I shouldn't put double-quotes inside double quotes, but I sure
don't want anyone to get bogged down if I used single quotes!)

"Can't read file"

I believe my commands are correct... It's the "Can't read file" nonsense....




"Bob I" <birelan@yahoo.com> wrote in message
news:eiKiF%234ZFHA.1448@TK2MSFTNGP09.phx.gbl...
> Plain and simple. The "FILE"(dontcopy.txt) placed after /EXCLUDE MUST BE A
> PLAIN TEXT FILE. Open NOTEPAD and put in the contents. The file types
> called out or listed in "dontcopy.txt" can be any type of file there ever
> was including unknown types because the only thing that is READ is the
> "dontcopy.txt" file and it MUST BE plain text and ONE entry per line. If
> you are using word or wordpad or wordperfect to make the exclude file,
> DON'T. Use NOTEPAD and ONLY NOTEPAD. Remember XCOPY reads the file
> containing the list of files to be excluded. If it's NOT PLAIN TEXT, it's
> not going to work.
>
> RJB wrote:
>
>> OK, I know you're trying to be helpful, but it's getting kind of tough.
>>
>> Trust me that I have spent hours - in batch file and just typing commands
>> in at the command prompt - and no matter what I do, I am getting the
>> "can't read" message.
>>
>> I am running in command prompt for two reasons: one is, I am tired of
>> opening the file, typing it, and saving it, when I can just run directly
>> in cmd.exe. Second, I don't get error messages when I run the batch. It
>> either works or it doesn't, and then the batch file closes. At least when
>> I run cmd.exe, I can read each error message as I go.
>>
>> I HAVE shown you the exact command I am attempting to run, to the best of
>> my ability. Since I have no way of copying from the command prompt to my
>> web browser, I must retype the commands. I am sorry for the few typos in
>> the translation. And, I have discovered that if I post in newsgroups
>> directly, my spell check has flubbed some things as well.
>>
>> From what I have found in xcopy /?, it tells me that the /EXCLUDE switch
>> should work with ANY file, not just text files.
>>
>> If it could be solved in less than a minute, it would have been. I am
>> sorry if turning to Microsoft help is not the answer. It was my first
>> line of defense.
>>
>> I have tried to answer every single question you have asked as carefuly
>> and as completely as possible. Again, my apologies for not being able to
>> anticipate the unasked and give you full open kimono.
>>
>> The only difference between what I have continually typed and what is on
>> my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>> really feel it was necessary to type that over and over again, when I
>> presumed we could understand \\SOURCEPATH\
>>
>> I do appreciate your trying to help. I have tried everything you have
>> said, along with every other permutation I could think of.
>>
>> **** No matter what I do, I get "Can't read file."
>>
>> It ain't trivial to me.
>>
>>
>> "Pegasus (MVP)" <I.can@fly.com> wrote in message
>> news:uVdpUS4ZFHA.3364@TK2MSFTNGP09.phx.gbl...
>>
>>>This is a curious thread in that we keep running into two types
>>>of problems:
>>>- You quote generic commands that have some character
>>> misplaced (first a colon, then a double quote), and then
>>> you say that this was not the real command anyway.
>>>- In spite of several encouragements, you never show us the
>>> real command you're using.
>>>
>>>Your latest reply is no exception: Again you do not show us what
>>>you've done - you only report the problems.
>>>
>>>I might add that your task is utterly trivial. I can be solved in less
>>>than a minute by someone who pays attention to standard batch
>>>file conventions.
>>>
>>>Unless you agree to show us what you have written (i.e. the
>>>verbatim contents of your batch file plus the contents of your
>>>"exclude" file), I will stop responding in this thread. Its length
>>>is badly out of proportion with the triviality of the problem.
>>>There is nothing sophisticated about it!
>>>
>>>
>>>
>>>"RJB" <notpublic@aol.com> wrote in message
>>>news:W_Ene.8790$Fb.2500@trndny07...
>>>
>>>>Thanks. The .bmp attempt was to test if the exclude command was working,
>>>
>>>and
>>>
>>>>something was wrong with the .txt file setup.
>>>>
>>>>(I thought if I excluded ONE file, then I would prove that /EXCLUDE was
>>>>working... And the .txt file was the problem. I didn't realize EXCLUDE
>>>
>>>MUST
>>>
>>>>be a .txt file... I thought that was only to exclude a series of
>>>>files...
>>>>For just one file of any kind, I presumed you could exclude that. Do you
>>>>understand what I was trying?)
>>>>
>>>>As you can see from my first line in this reply, I am still getting the
>>>>error... "Can't read file".
>>>>
>>>>And the quotes were quotes meaning, "Hey, everything between the quotes
>>>>is
>>>>what I typed for a command". I thought I only needed quotation marks on
>>>
>>>the
>>>
>>>>actual command line if I was using the 'long' file and path names from
>>>>Windows rather than the traditional DOS-tastic 8 character path name.
>>>>
>>>>So I am still where I started.
>>>>
>>>>(And I don't want to copy everything and delete. Eventually, there will
>>>>be
>>>>files in the source and destination directories that are different, but
>>>
>>>will
>>>
>>>>have the same name! THOSE are the very files I need to exclude from
>>>
>>>copying!
>>>
>>>>I think what I may do is:
>>>>
>>>>MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
>>>>Copy \\SOURCE\*.*
>>>>MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>>>>
>>>>and call it a day!
>>>>
>>>>
>>>>
>>>>
>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
>>>>
>>>>>You need to be a little more careful with your code, especially
>>>>>if you want to do "Sophisticated copying" (your Subject line).
>>>>>I wrote this:
>>>>>
>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>>>>>
>>>>>There are two obvious problems with your code:
>>>>>- You shifted the first quote to the beginning of the line. Makes no
>>>
>>>sense
>>>
>>>>>whatsoever!
>>>>>- You quote a .bmp file after the exclude switch. On several previous
>>>>>occasions in this thread it was pointed out that the file after the
>>>>>/exclude switch must be a text file containing a list of files to be
>>>>>excluded. It cannot be a .bmp file!
>>>>>
>>>>>
>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>news:SPpne.8594$Fb.2545@trndny07...
>>>>>
>>>>>>STILL a "Can't read file
>>>
>>>\\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>>>
>>>>>>I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
>>>>>>copies everything.
>>>>>>
>>>>>>Also, I tried the line with an
>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of
>>>
>>>my
>>>
>>>>>>dog - and still got the "Can't read file ...grace.bmp"
>>>>>>
>>>>>>So, it appears to be something it's not liking about "Exclude"?
>>>>>>
>>>>>>Arggggghhhhh!
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>>>>>>
>>>>>>>With your "path" command you wrecked your existing path! The
>>>>>>>correct way would be to type this:
>>>>>>>
>>>>>>>path %path%;\\SourceDrive\ShareDocs.
>>>>>>>
>>>>>>>However . . . adding SourceDrive\ShareDocs to the path makes no
>>>>>>>sense, because SourceDrive\ShareDocs contains no executable
>>>>>>>programs. The path is used to locate executable programs, not data
>>>>>>>files.
>>>>>>>
>>>>>>>Here is what you should type:
>>>>>>>
>>>>>>>xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>>>>>>>
>>>>>>>This is all one long line. Note the "/y" switch, the trailing
>>>
>>>backslash
>>>
>>>>>>>after "c:\Receive\", and the sets of double quotes. Depending on
>>>>>>>your actual names, they could be essential.
>>>>>>>
>>>>>>>
>>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>>news:qg5ne.5780$Lb.1073@trndny05...
>>>>>>>
>>>>>>>>I added
>>>>>>>>PATH \\SOURCEDRIVE\SHAREDDOCS
>>>>>>>>
>>>>>>>>And now get
>>>>>>>> 'xcopy' is not recognized as an internal or external command,
>>>>>>>> operable program or batch file
>>>>>>>>
>>>>>>>>I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>>>>>>>>
>>>>>>>>btw, here is the full command in my batch file:
>>>>>>>>
>>>>>>>>XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
>>>>>
>>>>>C:\RECEIVE
>>>>>
>>>>>>>>My goal is to take all of the files (save the five listed in
>>>>>>>>"dontcopy.txt"!) and copy them from a subdirectory called "Mailroom"
>>>>>>>>on
>>>>>>>>my
>>>>>>>>server to a subdirectory called "Receive" on my laptop.
>>>>>>>>
>>>>>>>>(The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>>>>>>>>
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>"Bob I" <birelan@yahoo.com> wrote in message
>>>>>>>>news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>>>>>>>>
>>>>>>>>>From the help
>>>>>>>>>" /EXCLUDE:file1[+file2][+file3]...
>>>>>>>>>Specifies a list of files containing strings. Each string should
>>>
>>>be
>>>
>>>>>in
>>>>>
>>>>>>>a
>>>>>>>
>>>>>>>>>separate line in the files. When any of the strings match any
>>>
>>>part
>>>
>>>>>of
>>>>>
>>>>>>>the
>>>>>>>
>>>>>>>>>absolute path of the file to be copied, that file will be excluded
>>>>>
>>>>>from
>>>>>
>>>>>>>>>being copied. For example, specifying a string like \obj\ or .obj
>>>>>
>>>>>will
>>>>>
>>>>>>>>>exclude all files underneath the directory obj or all files with
>>>
>>>the
>>>
>>>>>>>.obj
>>>>>>>
>>>>>>>>>extension respectively."
>>>>>>>>>
>>>>>>>>>So
>>>>>>>>>/EXCLUDE:dontcopy.txt
>>>>>>>>>NOT
>>>>>>>>>/EXCLUDE dontcopy.txt
>>>>>>>>>
>>>>>>>>>Since where you put the file resulted in "can't read xxx", I
>>>
>>>suggest
>>>
>>>>>>>>>putting "dontcopy.txt" in a directory that is listed in the PATH
>>>>>>>
>>>>>>>listing.
>>>>>>>
>>>>>>>>>RJB wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>It's all listed in the screens above
>>>>>>>>>>
>>>>>>>>>>The donotcopy.txt contains a list - one per line - of each
>>>
>>>exclded
>>>
>>>>>>>file.
>>>>>>>
>>>>>>>>>>The long and short is
>>>>>>>>>>
>>>>>>>>>>xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>>>>>>>>>>\\receivingpath\subdirectory
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>>>news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>Let's see your precise command, and the contents of the
>>>>>>>>>>>exclude file.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>>>>>>>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>I've tried every permutation I can think of, and the results I
>>>
>>>get
>>>
>>>>>>>are:
>>>>>>>
>>>>>>>>>>>>Can't read file: XXX
>>>>>>>>>>>>
>>>>>>>>>>>> 0 File(s) copied
>>>>>>>>>>>>
>>>>>>>>>>>>(where XXX is whatever file comes after the "/exclude:" switch.
>>>>>>>>>>>>
>>>>>>>>>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>>>>>>>>>
>>>>>>>>>>>>Also, if I just try to exclude file(s) by name - a la
>>>>>>>
>>>>>>>/EXCLUDE:ABC*.fil,
>>>>>>>
>>>>>>>>>>>>I
>>>>>>>>>>>>get the same result...
>>>>>>>>>>>>Can't read file: ABC*.fil
>>>>>>>>>>>>
>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>
>>>>>>>>>>>>What the heck is going on???
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>BINGO! We have a Winner! :-) :-)
>>>>>>>>>>>>>
>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>1) Create a notepad file
>>>>>>>>>>>>>>2) In the file, type:
>>>>>>>>>>>>>>ABC Jackson.fil
>>>>>>>>>>>>>>ABC Smith.fil
>>>>>>>>>>>>>>ABC Alias.fil
>>>>>>>>>>>>>>ABC Lost.fil
>>>>>>>>>>>>>>ABC Polar.fil
>>>>>>>>>>>>>>3) Save it as "filelist.txt"
>>>>>>>>>>>>>>4) In the xcopy command,
>>>>>>>>>>>>>> XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>>>>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Close?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Inline,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>>>>>>>>>>>>>>>>cream
>>>>>>>>>>>
>>>>>>>>>>>headache.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>From your initial post, it seems as if I am creating a
>>>
>>>file -
>>>
>>>>>>>called
>>>>>>>
>>>>>>>>>>>"file1"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>CORRECT
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>But I probably just want to do
>>>>>>>>>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Wrong, should be like this
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>>>>>>>>>one entry per line, you may have to experiment with it a bit.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>nope.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>

Kerry Brown
07-10-2005, 12:56 AM
"RJB" <notpublic@aol.com> wrote in message
news:oYFne.26046$Ub.7025@trndny09...

<SNIP>

> The only difference between what I have continually typed and what is on
> my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
> really feel it was necessary to type that over and over again, when I
> presumed we could understand \\SOURCEPATH\

Unless this is another typo it is your problem. There is an extra backslash
after G: With a long path it is sometimes easier to make sure you are
explicitly in the directory where the files are located.

e.g.

G:
CD \CURRENT_FOLDER
XCOPY G:*.* H:\copy_files_here\ /EXCLUDE:FILELIST.TXT

Make sure FILELIST.TXT and the files to be copied are in this directory.

Kerry

RJB
07-10-2005, 12:56 AM
Thanks. I caught that and fixed it at some point. I have the subdirectory
mapped so it was actually \\RJBDESKTOP\SHAREDDOCS, but the full path is the
G:\LEDBER\blahblahblah.

What do you mean "make sure [I am] explicitly in the directory"? I am
running the batch file FROM the destination laptop...

Still not it... Because if I delete the /EXCLUDE command, everything copies
OK. It's just hanging on the /EXCLUDE command. Which I have put at the end
of the command line, as well.

Arrrgggghhhh....

Here's the next thing I may try:

ATTRIB +h ABC*.*
xcopy \\SOURCEPATH\etc
ATTRIB -h ABC *.*





"Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
news:ulS$Uo5ZFHA.2788@TK2MSFTNGP12.phx.gbl...
> "RJB" <notpublic@aol.com> wrote in message
> news:oYFne.26046$Ub.7025@trndny09...
>
> <SNIP>
>
>> The only difference between what I have continually typed and what is on
>> my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>> really feel it was necessary to type that over and over again, when I
>> presumed we could understand \\SOURCEPATH\
>
> Unless this is another typo it is your problem. There is an extra
> backslash after G: With a long path it is sometimes easier to make sure
> you are explicitly in the directory where the files are located.
>
> e.g.
>
> G:
> CD \CURRENT_FOLDER
> XCOPY G:*.* H:\copy_files_here\ /EXCLUDE:FILELIST.TXT
>
> Make sure FILELIST.TXT and the files to be copied are in this directory.
>
> Kerry
>
>

Kerry Brown
07-10-2005, 12:56 AM
"RJB" <notpublic@aol.com> wrote in message
news:hPHne.12729$zb.7635@trndny01...
> Thanks. I caught that and fixed it at some point. I have the subdirectory
> mapped so it was actually \\RJBDESKTOP\SHAREDDOCS, but the full path is
> the G:\LEDBER\blahblahblah.
>
> What do you mean "make sure [I am] explicitly in the directory"? I am
> running the batch file FROM the destination laptop...
>

Are you at a cmd prompt? Is the current directory the source directory? Is
the excludelist.txt file in the same directory? If so then don't use paths
other than the destination in the xcopy command. If you are exectuting from
a .cmd file then use the commands from my last post to make sure the current
directory is correct. If all of the above is not true then make it so and
try again. It works everytime on two seperate computers for me.


> Still not it... Because if I delete the /EXCLUDE command, everything
> copies OK. It's just hanging on the /EXCLUDE command. Which I have put at
> the end of the command line, as well.
>
> Arrrgggghhhh....
>
> Here's the next thing I may try:
>
> ATTRIB +h ABC*.*
> xcopy \\SOURCEPATH\etc
> ATTRIB -h ABC *.*
>
>
>
>
>
> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
> news:ulS$Uo5ZFHA.2788@TK2MSFTNGP12.phx.gbl...
>> "RJB" <notpublic@aol.com> wrote in message
>> news:oYFne.26046$Ub.7025@trndny09...
>>
>> <SNIP>
>>
>>> The only difference between what I have continually typed and what is on
>>> my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>>> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>>> really feel it was necessary to type that over and over again, when I
>>> presumed we could understand \\SOURCEPATH\
>>
>> Unless this is another typo it is your problem. There is an extra
>> backslash after G: With a long path it is sometimes easier to make sure
>> you are explicitly in the directory where the files are located.
>>
>> e.g.
>>
>> G:
>> CD \CURRENT_FOLDER
>> XCOPY G:*.* H:\copy_files_here\ /EXCLUDE:FILELIST.TXT
>>
>> Make sure FILELIST.TXT and the files to be copied are in this directory.
>>
>> Kerry
>>
>>
>
>

Bob I
07-10-2005, 12:56 AM
Messing around I discovered that
1. * or "wildcards" are not read as wildcards. Everything in the string
is literal.
2. Was unsuccessful at reproducing the Can't read file" error.

Suggest
1. Using just ABC as the criteria in the DONTCOPY.TXT file.
2. Try running from the command line rather than batch file till it works.
3. Try using shorter path or local drive for the exclude file.

RJB wrote:

> Done that.
>
> Done it three ways:
>
> 1) Listing each file on its own line
> 2) Listing each file, with its full path, on its own line
> 3) (What I'd prefer) Going back to my original examples, "ABC*.fil".
>
> (Now, granted, they are not literally "ABC Jackson.fil" etc., but the file
> names DO include proprietary information, and I can't post the actual file
> names here. Suffice to say they all are the same extensions, and the ones I
> wish to exclude ALL begin with the same three letters!)
>
> And, to be avoid typos, I am highlighting the file, choosing Properties,
> highlighting the file's name, COPYing it, and PASTEing it into the Notepad
> file!
>
> If I delete the /EXCLUDE switch, the whole subdirectory copies, so I know my
> path is correct.
>
> I continue to get "Can't read file:" \\G:\LEDBER\USERS\OPERATIONS\RJ_(My
> last name)\SHAREDDOCS\MAILROOM\nocopylist.txt"" <=(I created a new Notepad
> file and called it nocopylist.txt) (And for the rock and roll grammar patrol
> folks, I KNOW I shouldn't put double-quotes inside double quotes, but I sure
> don't want anyone to get bogged down if I used single quotes!)
>
> "Can't read file"
>
> I believe my commands are correct... It's the "Can't read file" nonsense....
>
>
>
>
> "Bob I" <birelan@yahoo.com> wrote in message
> news:eiKiF%234ZFHA.1448@TK2MSFTNGP09.phx.gbl...
>
>>Plain and simple. The "FILE"(dontcopy.txt) placed after /EXCLUDE MUST BE A
>>PLAIN TEXT FILE. Open NOTEPAD and put in the contents. The file types
>>called out or listed in "dontcopy.txt" can be any type of file there ever
>>was including unknown types because the only thing that is READ is the
>>"dontcopy.txt" file and it MUST BE plain text and ONE entry per line. If
>>you are using word or wordpad or wordperfect to make the exclude file,
>>DON'T. Use NOTEPAD and ONLY NOTEPAD. Remember XCOPY reads the file
>>containing the list of files to be excluded. If it's NOT PLAIN TEXT, it's
>>not going to work.
>>
>>RJB wrote:
>>
>>
>>>OK, I know you're trying to be helpful, but it's getting kind of tough.
>>>
>>>Trust me that I have spent hours - in batch file and just typing commands
>>>in at the command prompt - and no matter what I do, I am getting the
>>>"can't read" message.
>>>
>>>I am running in command prompt for two reasons: one is, I am tired of
>>>opening the file, typing it, and saving it, when I can just run directly
>>>in cmd.exe. Second, I don't get error messages when I run the batch. It
>>>either works or it doesn't, and then the batch file closes. At least when
>>>I run cmd.exe, I can read each error message as I go.
>>>
>>>I HAVE shown you the exact command I am attempting to run, to the best of
>>>my ability. Since I have no way of copying from the command prompt to my
>>>web browser, I must retype the commands. I am sorry for the few typos in
>>>the translation. And, I have discovered that if I post in newsgroups
>>>directly, my spell check has flubbed some things as well.
>>>
>>>From what I have found in xcopy /?, it tells me that the /EXCLUDE switch
>>>should work with ANY file, not just text files.
>>>
>>>If it could be solved in less than a minute, it would have been. I am
>>>sorry if turning to Microsoft help is not the answer. It was my first
>>>line of defense.
>>>
>>>I have tried to answer every single question you have asked as carefuly
>>>and as completely as possible. Again, my apologies for not being able to
>>>anticipate the unasked and give you full open kimono.
>>>
>>>The only difference between what I have continually typed and what is on
>>>my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>>>G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>>>really feel it was necessary to type that over and over again, when I
>>>presumed we could understand \\SOURCEPATH\
>>>
>>>I do appreciate your trying to help. I have tried everything you have
>>>said, along with every other permutation I could think of.
>>>
>>>**** No matter what I do, I get "Can't read file."
>>>
>>>It ain't trivial to me.
>>>
>>>
>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>news:uVdpUS4ZFHA.3364@TK2MSFTNGP09.phx.gbl...
>>>
>>>
>>>>This is a curious thread in that we keep running into two types
>>>>of problems:
>>>>- You quote generic commands that have some character
>>>> misplaced (first a colon, then a double quote), and then
>>>> you say that this was not the real command anyway.
>>>>- In spite of several encouragements, you never show us the
>>>>real command you're using.
>>>>
>>>>Your latest reply is no exception: Again you do not show us what
>>>>you've done - you only report the problems.
>>>>
>>>>I might add that your task is utterly trivial. I can be solved in less
>>>>than a minute by someone who pays attention to standard batch
>>>>file conventions.
>>>>
>>>>Unless you agree to show us what you have written (i.e. the
>>>>verbatim contents of your batch file plus the contents of your
>>>>"exclude" file), I will stop responding in this thread. Its length
>>>>is badly out of proportion with the triviality of the problem.
>>>>There is nothing sophisticated about it!
>>>>
>>>>
>>>>
>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>news:W_Ene.8790$Fb.2500@trndny07...
>>>>
>>>>
>>>>>Thanks. The .bmp attempt was to test if the exclude command was working,
>>>>
>>>>and
>>>>
>>>>
>>>>>something was wrong with the .txt file setup.
>>>>>
>>>>>(I thought if I excluded ONE file, then I would prove that /EXCLUDE was
>>>>>working... And the .txt file was the problem. I didn't realize EXCLUDE
>>>>
>>>>MUST
>>>>
>>>>
>>>>>be a .txt file... I thought that was only to exclude a series of
>>>>>files...
>>>>>For just one file of any kind, I presumed you could exclude that. Do you
>>>>>understand what I was trying?)
>>>>>
>>>>>As you can see from my first line in this reply, I am still getting the
>>>>>error... "Can't read file".
>>>>>
>>>>>And the quotes were quotes meaning, "Hey, everything between the quotes
>>>>>is
>>>>>what I typed for a command". I thought I only needed quotation marks on
>>>>
>>>>the
>>>>
>>>>
>>>>>actual command line if I was using the 'long' file and path names from
>>>>>Windows rather than the traditional DOS-tastic 8 character path name.
>>>>>
>>>>>So I am still where I started.
>>>>>
>>>>>(And I don't want to copy everything and delete. Eventually, there will
>>>>>be
>>>>>files in the source and destination directories that are different, but
>>>>
>>>>will
>>>>
>>>>
>>>>>have the same name! THOSE are the very files I need to exclude from
>>>>
>>>>copying!
>>>>
>>>>
>>>>>I think what I may do is:
>>>>>
>>>>>MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
>>>>>Copy \\SOURCE\*.*
>>>>>MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>>>>>
>>>>>and call it a day!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
>>>>>
>>>>>
>>>>>>You need to be a little more careful with your code, especially
>>>>>>if you want to do "Sophisticated copying" (your Subject line).
>>>>>>I wrote this:
>>>>>>
>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>>>>>>
>>>>>>There are two obvious problems with your code:
>>>>>>- You shifted the first quote to the beginning of the line. Makes no
>>>>
>>>>sense
>>>>
>>>>
>>>>>>whatsoever!
>>>>>>- You quote a .bmp file after the exclude switch. On several previous
>>>>>>occasions in this thread it was pointed out that the file after the
>>>>>>/exclude switch must be a text file containing a list of files to be
>>>>>>excluded. It cannot be a .bmp file!
>>>>>>
>>>>>>
>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>news:SPpne.8594$Fb.2545@trndny07...
>>>>>>
>>>>>>
>>>>>>>STILL a "Can't read file
>>>>
>>>>\\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>>>>
>>>>
>>>>>>>I know the "path" is OK, because if I exclude the "/EXCLUDE:" line, it
>>>>>>>copies everything.
>>>>>>>
>>>>>>>Also, I tried the line with an
>>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture of
>>>>
>>>>my
>>>>
>>>>
>>>>>>>dog - and still got the "Can't read file ...grace.bmp"
>>>>>>>
>>>>>>>So, it appears to be something it's not liking about "Exclude"?
>>>>>>>
>>>>>>>Arggggghhhhh!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>>>>>>>
>>>>>>>
>>>>>>>>With your "path" command you wrecked your existing path! The
>>>>>>>>correct way would be to type this:
>>>>>>>>
>>>>>>>>path %path%;\\SourceDrive\ShareDocs.
>>>>>>>>
>>>>>>>>However . . . adding SourceDrive\ShareDocs to the path makes no
>>>>>>>>sense, because SourceDrive\ShareDocs contains no executable
>>>>>>>>programs. The path is used to locate executable programs, not data
>>>>>>>>files.
>>>>>>>>
>>>>>>>>Here is what you should type:
>>>>>>>>
>>>>>>>>xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>>>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>>>>>>>>
>>>>>>>>This is all one long line. Note the "/y" switch, the trailing
>>>>
>>>>backslash
>>>>
>>>>
>>>>>>>>after "c:\Receive\", and the sets of double quotes. Depending on
>>>>>>>>your actual names, they could be essential.
>>>>>>>>
>>>>>>>>
>>>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>>>news:qg5ne.5780$Lb.1073@trndny05...
>>>>>>>>
>>>>>>>>
>>>>>>>>>I added
>>>>>>>>>PATH \\SOURCEDRIVE\SHAREDDOCS
>>>>>>>>>
>>>>>>>>>And now get
>>>>>>>>> 'xcopy' is not recognized as an internal or external command,
>>>>>>>>> operable program or batch file
>>>>>>>>>
>>>>>>>>>I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>>>>>>>>>
>>>>>>>>>btw, here is the full command in my batch file:
>>>>>>>>>
>>>>>>>>>XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
>>>>>>
>>>>>>C:\RECEIVE
>>>>>>
>>>>>>
>>>>>>>>>My goal is to take all of the files (save the five listed in
>>>>>>>>>"dontcopy.txt"!) and copy them from a subdirectory called "Mailroom"
>>>>>>>>>on
>>>>>>>>>my
>>>>>>>>>server to a subdirectory called "Receive" on my laptop.
>>>>>>>>>
>>>>>>>>>(The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>Thanks,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>"Bob I" <birelan@yahoo.com> wrote in message
>>>>>>>>>news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>>>>>>>>>
>>>>>>>>>>From the help
>>>>>>>>>
>>>>>>>>>>" /EXCLUDE:file1[+file2][+file3]...
>>>>>>>>>>Specifies a list of files containing strings. Each string should
>>>>
>>>>be
>>>>
>>>>
>>>>>>in
>>>>>>
>>>>>>
>>>>>>>>a
>>>>>>>>
>>>>>>>>
>>>>>>>>>>separate line in the files. When any of the strings match any
>>>>
>>>>part
>>>>
>>>>
>>>>>>of
>>>>>>
>>>>>>
>>>>>>>>the
>>>>>>>>
>>>>>>>>
>>>>>>>>>>absolute path of the file to be copied, that file will be excluded
>>>>>>
>>>>>>from
>>>>>>
>>>>>>
>>>>>>>>>>being copied. For example, specifying a string like \obj\ or .obj
>>>>>>
>>>>>>will
>>>>>>
>>>>>>
>>>>>>>>>>exclude all files underneath the directory obj or all files with
>>>>
>>>>the
>>>>
>>>>
>>>>>>>>.obj
>>>>>>>>
>>>>>>>>
>>>>>>>>>>extension respectively."
>>>>>>>>>>
>>>>>>>>>>So
>>>>>>>>>>/EXCLUDE:dontcopy.txt
>>>>>>>>>>NOT
>>>>>>>>>>/EXCLUDE dontcopy.txt
>>>>>>>>>>
>>>>>>>>>>Since where you put the file resulted in "can't read xxx", I
>>>>
>>>>suggest
>>>>
>>>>
>>>>>>>>>>putting "dontcopy.txt" in a directory that is listed in the PATH
>>>>>>>>
>>>>>>>>listing.
>>>>>>>>
>>>>>>>>
>>>>>>>>>>RJB wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>It's all listed in the screens above
>>>>>>>>>>>
>>>>>>>>>>>The donotcopy.txt contains a list - one per line - of each
>>>>
>>>>exclded
>>>>
>>>>
>>>>>>>>file.
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>The long and short is
>>>>>>>>>>>
>>>>>>>>>>>xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>>>>>>>>>>>\\receivingpath\subdirectory
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>>>>news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>Let's see your precise command, and the contents of the
>>>>>>>>>>>>exclude file.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>>>>>>>>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>I've tried every permutation I can think of, and the results I
>>>>
>>>>get
>>>>
>>>>
>>>>>>>>are:
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>>>Can't read file: XXX
>>>>>>>>>>>>>
>>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>>
>>>>>>>>>>>>>(where XXX is whatever file comes after the "/exclude:" switch.
>>>>>>>>>>>>>
>>>>>>>>>>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>>>>>>>>>>
>>>>>>>>>>>>>Also, if I just try to exclude file(s) by name - a la
>>>>>>>>
>>>>>>>>/EXCLUDE:ABC*.fil,
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>>>I
>>>>>>>>>>>>>get the same result...
>>>>>>>>>>>>>Can't read file: ABC*.fil
>>>>>>>>>>>>>
>>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>>
>>>>>>>>>>>>>What the heck is going on???
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>BINGO! We have a Winner! :-) :-)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>1) Create a notepad file
>>>>>>>>>>>>>>>2) In the file, type:
>>>>>>>>>>>>>>>ABC Jackson.fil
>>>>>>>>>>>>>>>ABC Smith.fil
>>>>>>>>>>>>>>>ABC Alias.fil
>>>>>>>>>>>>>>>ABC Lost.fil
>>>>>>>>>>>>>>>ABC Polar.fil
>>>>>>>>>>>>>>>3) Save it as "filelist.txt"
>>>>>>>>>>>>>>>4) In the xcopy command,
>>>>>>>>>>>>>>>XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>>>>>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Close?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Inline,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>>>>>>>>>>>>>>>>>cream
>>>>>>>>>>>>
>>>>>>>>>>>>headache.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>From your initial post, it seems as if I am creating a
>>>>
>>>>file -
>>>>
>>>>
>>>>>>>>called
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>>"file1"
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>CORRECT
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>But I probably just want to do
>>>>>>>>>>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Wrong, should be like this
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>>>>>>>>>>one entry per line, you may have to experiment with it a bit.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>nope.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>
>
>

RJB
07-10-2005, 12:56 AM
When I am at a cmd prompt, I am NOT "in" the source directory. I am on the
receiving machine (my laptop) at the default location... Which is in,
apparrently, "My Documents"

When I am using my file, I don't know where it is, implicitly or
explicitly!! But I caught something that in your message that's a little
strange... What I am calling a "batch" file is a file I opened in notepad,
typed out the individual lines of commands, and saved as "Copy.bat". But you
mentioned a ".cmd" file. Which should I use?

I don't think that's the problem; again, when I run it using the cmd prompt,
I am still getting the same error message.

As you can tell, I am stubbornly determined to get the /EXCLUDE to work!!!!!


"Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
news:%23QSz9a6ZFHA.3032@TK2MSFTNGP10.phx.gbl...
> "RJB" <notpublic@aol.com> wrote in message
> news:hPHne.12729$zb.7635@trndny01...
>> Thanks. I caught that and fixed it at some point. I have the subdirectory
>> mapped so it was actually \\RJBDESKTOP\SHAREDDOCS, but the full path is
>> the G:\LEDBER\blahblahblah.
>>
>> What do you mean "make sure [I am] explicitly in the directory"? I am
>> running the batch file FROM the destination laptop...
>>
>
> Are you at a cmd prompt? Is the current directory the source directory? Is
> the excludelist.txt file in the same directory? If so then don't use paths
> other than the destination in the xcopy command. If you are exectuting
> from a .cmd file then use the commands from my last post to make sure the
> current directory is correct. If all of the above is not true then make it
> so and try again. It works everytime on two seperate computers for me.
>
>
>> Still not it... Because if I delete the /EXCLUDE command, everything
>> copies OK. It's just hanging on the /EXCLUDE command. Which I have put at
>> the end of the command line, as well.
>>
>> Arrrgggghhhh....
>>
>> Here's the next thing I may try:
>>
>> ATTRIB +h ABC*.*
>> xcopy \\SOURCEPATH\etc
>> ATTRIB -h ABC *.*
>>
>>
>>
>>
>>
>> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
>> news:ulS$Uo5ZFHA.2788@TK2MSFTNGP12.phx.gbl...
>>> "RJB" <notpublic@aol.com> wrote in message
>>> news:oYFne.26046$Ub.7025@trndny09...
>>>
>>> <SNIP>
>>>
>>>> The only difference between what I have continually typed and what is
>>>> on my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>>>> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>>>> really feel it was necessary to type that over and over again, when I
>>>> presumed we could understand \\SOURCEPATH\
>>>
>>> Unless this is another typo it is your problem. There is an extra
>>> backslash after G: With a long path it is sometimes easier to make sure
>>> you are explicitly in the directory where the files are located.
>>>
>>> e.g.
>>>
>>> G:
>>> CD \CURRENT_FOLDER
>>> XCOPY G:*.* H:\copy_files_here\ /EXCLUDE:FILELIST.TXT
>>>
>>> Make sure FILELIST.TXT and the files to be copied are in this directory.
>>>
>>> Kerry
>>>
>>>
>>
>>
>
>

Kerry Brown
07-10-2005, 12:56 AM
"RJB" <notpublic@aol.com> wrote in message
news:IDJne.12751$zb.3936@trndny01...
> When I am at a cmd prompt, I am NOT "in" the source directory. I am on the
> receiving machine (my laptop) at the default location... Which is in,
> apparrently, "My Documents"

Try it from the source directory with the exclude file in the source
directory. If you want ot get something working read everyone's posts and
try following directions. Once it's working you can build from there.

>
> When I am using my file, I don't know where it is, implicitly or
> explicitly!! But I caught something that in your message that's a little
> strange... What I am calling a "batch" file is a file I opened in notepad,
> typed out the individual lines of commands, and saved as "Copy.bat". But
> you mentioned a ".cmd" file. Which should I use?

No difference

>
> I don't think that's the problem; again, when I run it using the cmd
> prompt, I am still getting the same error message.
>
> As you can tell, I am stubbornly determined to get the /EXCLUDE to
> work!!!!!
>
>
> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
> news:%23QSz9a6ZFHA.3032@TK2MSFTNGP10.phx.gbl...
>> "RJB" <notpublic@aol.com> wrote in message
>> news:hPHne.12729$zb.7635@trndny01...
>>> Thanks. I caught that and fixed it at some point. I have the
>>> subdirectory mapped so it was actually \\RJBDESKTOP\SHAREDDOCS, but the
>>> full path is the G:\LEDBER\blahblahblah.
>>>
>>> What do you mean "make sure [I am] explicitly in the directory"? I am
>>> running the batch file FROM the destination laptop...
>>>
>>
>> Are you at a cmd prompt? Is the current directory the source directory?
>> Is the excludelist.txt file in the same directory? If so then don't use
>> paths other than the destination in the xcopy command. If you are
>> exectuting from a .cmd file then use the commands from my last post to
>> make sure the current directory is correct. If all of the above is not
>> true then make it so and try again. It works everytime on two seperate
>> computers for me.
>>
>>
>>> Still not it... Because if I delete the /EXCLUDE command, everything
>>> copies OK. It's just hanging on the /EXCLUDE command. Which I have put
>>> at the end of the command line, as well.
>>>
>>> Arrrgggghhhh....
>>>
>>> Here's the next thing I may try:
>>>
>>> ATTRIB +h ABC*.*
>>> xcopy \\SOURCEPATH\etc
>>> ATTRIB -h ABC *.*
>>>
>>>
>>>
>>>
>>>
>>> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
>>> news:ulS$Uo5ZFHA.2788@TK2MSFTNGP12.phx.gbl...
>>>> "RJB" <notpublic@aol.com> wrote in message
>>>> news:oYFne.26046$Ub.7025@trndny09...
>>>>
>>>> <SNIP>
>>>>
>>>>> The only difference between what I have continually typed and what is
>>>>> on my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>>>>> G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>>>>> really feel it was necessary to type that over and over again, when I
>>>>> presumed we could understand \\SOURCEPATH\
>>>>
>>>> Unless this is another typo it is your problem. There is an extra
>>>> backslash after G: With a long path it is sometimes easier to make sure
>>>> you are explicitly in the directory where the files are located.
>>>>
>>>> e.g.
>>>>
>>>> G:
>>>> CD \CURRENT_FOLDER
>>>> XCOPY G:*.* H:\copy_files_here\ /EXCLUDE:FILELIST.TXT
>>>>
>>>> Make sure FILELIST.TXT and the files to be copied are in this
>>>> directory.
>>>>
>>>> Kerry
>>>>
>>>>
>>>
>>>
>>
>>
>
>

RJB
07-10-2005, 12:56 AM
Is the /EXCLUDE maybe something that's broken? Is XCOPY a "command" or a
"program" that I can reinstall?

I have been running mostly from command instead of batch, for reasons I
posted somewhere else in a fit of confusion.

Your Suggestion 1: Are you suggesting that I should have an entire line in
my DONTCOPY.TXT that is simply

ABC

and that will automatically wildcard it?


Your suggestions 3: Are you suggesting I move my exclude file to say,
"c:\DONTCOPY.TXT"?


I want to be sure I understand the logic of what we're doing:
I have a subdirectory called "MAILROOM".
It is on my desktop machine "RJBDESKTOP".
MAILROOM contains a bunch of files. Several of them change daily (let's call
them the "Penske Files"), and some are specific to and must be resident on
the host machine (the "ABC" files). Sometimes I am working from my laptop,
sometimes at my desktop.
I would like to have access to the Penske files whilst on the road and
gotomypc is unavailable.
So, I want to XCOPY MAILROOM from my desktop to my laptop.
That will copy the entire contents, subdirectories and all, from MAILROOM to
my laptop.
It is OK if desktop Penske Files overwrite laptop Penske Files.
So I put the /y switch in, to say "[Y]es, please overwrite"
But I specifically don't want the ABC files to copy. Because I DON'T want
the desktop ABC files to overwrite the laptop ABC files.
So I launched notepad.exe
And I typed the name of each ABC file, one per line.
And I saved it as NOCOPYLIST.TXT
So I want to EXCLUDE NOCOPYLIST.TXT from the XCOPY
And the command for that is /EXCLUDE:NOCOPYLIST.TXT

So the overriding command is
XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
/EXCLUDE:NOCOPYLIST.TXT "C:\RECEIVE\"




Again, I get the error message "Can't read file: "NOCOPYLIST.TXT""
If I run
XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
"C:\RECEIVE\"
The ABC and Penske files do indeed copy.



"Bob I" <birelan@yahoo.com> wrote in message
news:OBlBXi6ZFHA.2796@TK2MSFTNGP10.phx.gbl...
> Messing around I discovered that
> 1. * or "wildcards" are not read as wildcards. Everything in the string is
> literal.
> 2. Was unsuccessful at reproducing the Can't read file" error.
>
> Suggest
> 1. Using just ABC as the criteria in the DONTCOPY.TXT file.
> 2. Try running from the command line rather than batch file till it works.
> 3. Try using shorter path or local drive for the exclude file.
>
> RJB wrote:
>
>> Done that.
>>
>> Done it three ways:
>>
>> 1) Listing each file on its own line
>> 2) Listing each file, with its full path, on its own line
>> 3) (What I'd prefer) Going back to my original examples, "ABC*.fil".
>>
>> (Now, granted, they are not literally "ABC Jackson.fil" etc., but the
>> file names DO include proprietary information, and I can't post the
>> actual file names here. Suffice to say they all are the same extensions,
>> and the ones I wish to exclude ALL begin with the same three letters!)
>>
>> And, to be avoid typos, I am highlighting the file, choosing Properties,
>> highlighting the file's name, COPYing it, and PASTEing it into the
>> Notepad file!
>>
>> If I delete the /EXCLUDE switch, the whole subdirectory copies, so I know
>> my path is correct.
>>
>> I continue to get "Can't read file:" \\G:\LEDBER\USERS\OPERATIONS\RJ_(My
>> last name)\SHAREDDOCS\MAILROOM\nocopylist.txt"" <=(I created a new
>> Notepad file and called it nocopylist.txt) (And for the rock and roll
>> grammar patrol folks, I KNOW I shouldn't put double-quotes inside double
>> quotes, but I sure don't want anyone to get bogged down if I used single
>> quotes!)
>>
>> "Can't read file"
>>
>> I believe my commands are correct... It's the "Can't read file"
>> nonsense....
>>
>>
>>
>>
>> "Bob I" <birelan@yahoo.com> wrote in message
>> news:eiKiF%234ZFHA.1448@TK2MSFTNGP09.phx.gbl...
>>
>>>Plain and simple. The "FILE"(dontcopy.txt) placed after /EXCLUDE MUST BE
>>>A PLAIN TEXT FILE. Open NOTEPAD and put in the contents. The file types
>>>called out or listed in "dontcopy.txt" can be any type of file there ever
>>>was including unknown types because the only thing that is READ is the
>>>"dontcopy.txt" file and it MUST BE plain text and ONE entry per line. If
>>>you are using word or wordpad or wordperfect to make the exclude file,
>>>DON'T. Use NOTEPAD and ONLY NOTEPAD. Remember XCOPY reads the file
>>>containing the list of files to be excluded. If it's NOT PLAIN TEXT, it's
>>>not going to work.
>>>
>>>RJB wrote:
>>>
>>>
>>>>OK, I know you're trying to be helpful, but it's getting kind of tough.
>>>>
>>>>Trust me that I have spent hours - in batch file and just typing
>>>>commands in at the command prompt - and no matter what I do, I am
>>>>getting the "can't read" message.
>>>>
>>>>I am running in command prompt for two reasons: one is, I am tired of
>>>>opening the file, typing it, and saving it, when I can just run directly
>>>>in cmd.exe. Second, I don't get error messages when I run the batch. It
>>>>either works or it doesn't, and then the batch file closes. At least
>>>>when I run cmd.exe, I can read each error message as I go.
>>>>
>>>>I HAVE shown you the exact command I am attempting to run, to the best
>>>>of my ability. Since I have no way of copying from the command prompt to
>>>>my web browser, I must retype the commands. I am sorry for the few typos
>>>>in the translation. And, I have discovered that if I post in newsgroups
>>>>directly, my spell check has flubbed some things as well.
>>>>
>>>>From what I have found in xcopy /?, it tells me that the /EXCLUDE switch
>>>>should work with ANY file, not just text files.
>>>>
>>>>If it could be solved in less than a minute, it would have been. I am
>>>>sorry if turning to Microsoft help is not the answer. It was my first
>>>>line of defense.
>>>>
>>>>I have tried to answer every single question you have asked as carefuly
>>>>and as completely as possible. Again, my apologies for not being able to
>>>>anticipate the unasked and give you full open kimono.
>>>>
>>>>The only difference between what I have continually typed and what is on
>>>>my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>>>>G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>>>>really feel it was necessary to type that over and over again, when I
>>>>presumed we could understand \\SOURCEPATH\
>>>>
>>>>I do appreciate your trying to help. I have tried everything you have
>>>>said, along with every other permutation I could think of.
>>>>
>>>>**** No matter what I do, I get "Can't read file."
>>>>
>>>>It ain't trivial to me.
>>>>
>>>>
>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>news:uVdpUS4ZFHA.3364@TK2MSFTNGP09.phx.gbl...
>>>>
>>>>
>>>>>This is a curious thread in that we keep running into two types
>>>>>of problems:
>>>>>- You quote generic commands that have some character
>>>>> misplaced (first a colon, then a double quote), and then
>>>>> you say that this was not the real command anyway.
>>>>>- In spite of several encouragements, you never show us the
>>>>>real command you're using.
>>>>>
>>>>>Your latest reply is no exception: Again you do not show us what
>>>>>you've done - you only report the problems.
>>>>>
>>>>>I might add that your task is utterly trivial. I can be solved in less
>>>>>than a minute by someone who pays attention to standard batch
>>>>>file conventions.
>>>>>
>>>>>Unless you agree to show us what you have written (i.e. the
>>>>>verbatim contents of your batch file plus the contents of your
>>>>>"exclude" file), I will stop responding in this thread. Its length
>>>>>is badly out of proportion with the triviality of the problem.
>>>>>There is nothing sophisticated about it!
>>>>>
>>>>>
>>>>>
>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>news:W_Ene.8790$Fb.2500@trndny07...
>>>>>
>>>>>
>>>>>>Thanks. The .bmp attempt was to test if the exclude command was
>>>>>>working,
>>>>>
>>>>>and
>>>>>
>>>>>
>>>>>>something was wrong with the .txt file setup.
>>>>>>
>>>>>>(I thought if I excluded ONE file, then I would prove that /EXCLUDE
>>>>>>was
>>>>>>working... And the .txt file was the problem. I didn't realize EXCLUDE
>>>>>
>>>>>MUST
>>>>>
>>>>>
>>>>>>be a .txt file... I thought that was only to exclude a series of
>>>>>>files...
>>>>>>For just one file of any kind, I presumed you could exclude that. Do
>>>>>>you
>>>>>>understand what I was trying?)
>>>>>>
>>>>>>As you can see from my first line in this reply, I am still getting
>>>>>>the
>>>>>>error... "Can't read file".
>>>>>>
>>>>>>And the quotes were quotes meaning, "Hey, everything between the
>>>>>>quotes is
>>>>>>what I typed for a command". I thought I only needed quotation marks
>>>>>>on
>>>>>
>>>>>the
>>>>>
>>>>>
>>>>>>actual command line if I was using the 'long' file and path names from
>>>>>>Windows rather than the traditional DOS-tastic 8 character path name.
>>>>>>
>>>>>>So I am still where I started.
>>>>>>
>>>>>>(And I don't want to copy everything and delete. Eventually, there
>>>>>>will be
>>>>>>files in the source and destination directories that are different,
>>>>>>but
>>>>>
>>>>>will
>>>>>
>>>>>
>>>>>>have the same name! THOSE are the very files I need to exclude from
>>>>>
>>>>>copying!
>>>>>
>>>>>
>>>>>>I think what I may do is:
>>>>>>
>>>>>>MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
>>>>>>Copy \\SOURCE\*.*
>>>>>>MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>>>>>>
>>>>>>and call it a day!
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
>>>>>>
>>>>>>
>>>>>>>You need to be a little more careful with your code, especially
>>>>>>>if you want to do "Sophisticated copying" (your Subject line).
>>>>>>>I wrote this:
>>>>>>>
>>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
>>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>>>>>>>
>>>>>>>There are two obvious problems with your code:
>>>>>>>- You shifted the first quote to the beginning of the line. Makes no
>>>>>
>>>>>sense
>>>>>
>>>>>
>>>>>>>whatsoever!
>>>>>>>- You quote a .bmp file after the exclude switch. On several previous
>>>>>>>occasions in this thread it was pointed out that the file after the
>>>>>>>/exclude switch must be a text file containing a list of files to be
>>>>>>>excluded. It cannot be a .bmp file!
>>>>>>>
>>>>>>>
>>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>>news:SPpne.8594$Fb.2545@trndny07...
>>>>>>>
>>>>>>>
>>>>>>>>STILL a "Can't read file
>>>>>
>>>>>\\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>>>>>
>>>>>
>>>>>>>>I know the "path" is OK, because if I exclude the "/EXCLUDE:" line,
>>>>>>>>it
>>>>>>>>copies everything.
>>>>>>>>
>>>>>>>>Also, I tried the line with an
>>>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture
>>>>>>>>of
>>>>>
>>>>>my
>>>>>
>>>>>
>>>>>>>>dog - and still got the "Can't read file ...grace.bmp"
>>>>>>>>
>>>>>>>>So, it appears to be something it's not liking about "Exclude"?
>>>>>>>>
>>>>>>>>Arggggghhhhh!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>>>>>>>>
>>>>>>>>
>>>>>>>>>With your "path" command you wrecked your existing path! The
>>>>>>>>>correct way would be to type this:
>>>>>>>>>
>>>>>>>>>path %path%;\\SourceDrive\ShareDocs.
>>>>>>>>>
>>>>>>>>>However . . . adding SourceDrive\ShareDocs to the path makes no
>>>>>>>>>sense, because SourceDrive\ShareDocs contains no executable
>>>>>>>>>programs. The path is used to locate executable programs, not data
>>>>>>>>>files.
>>>>>>>>>
>>>>>>>>>Here is what you should type:
>>>>>>>>>
>>>>>>>>>xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>>>>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>>>>>>>>>
>>>>>>>>>This is all one long line. Note the "/y" switch, the trailing
>>>>>
>>>>>backslash
>>>>>
>>>>>
>>>>>>>>>after "c:\Receive\", and the sets of double quotes. Depending on
>>>>>>>>>your actual names, they could be essential.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>>>>news:qg5ne.5780$Lb.1073@trndny05...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>I added
>>>>>>>>>>PATH \\SOURCEDRIVE\SHAREDDOCS
>>>>>>>>>>
>>>>>>>>>>And now get
>>>>>>>>>> 'xcopy' is not recognized as an internal or external command,
>>>>>>>>>> operable program or batch file
>>>>>>>>>>
>>>>>>>>>>I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>>>>>>>>>>
>>>>>>>>>>btw, here is the full command in my batch file:
>>>>>>>>>>
>>>>>>>>>>XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
>>>>>>>
>>>>>>>C:\RECEIVE
>>>>>>>
>>>>>>>
>>>>>>>>>>My goal is to take all of the files (save the five listed in
>>>>>>>>>>"dontcopy.txt"!) and copy them from a subdirectory called
>>>>>>>>>>"Mailroom"
>>>>>>>>>>on
>>>>>>>>>>my
>>>>>>>>>>server to a subdirectory called "Receive" on my laptop.
>>>>>>>>>>
>>>>>>>>>>(The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Thanks,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>"Bob I" <birelan@yahoo.com> wrote in message
>>>>>>>>>>news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>>>>>>>>>>
>>>>>>>>>>>From the help
>>>>>>>>>>
>>>>>>>>>>>" /EXCLUDE:file1[+file2][+file3]...
>>>>>>>>>>>Specifies a list of files containing strings. Each string should
>>>>>
>>>>>be
>>>>>
>>>>>
>>>>>>>in
>>>>>>>
>>>>>>>
>>>>>>>>>a
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>separate line in the files. When any of the strings match any
>>>>>
>>>>>part
>>>>>
>>>>>
>>>>>>>of
>>>>>>>
>>>>>>>
>>>>>>>>>the
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>absolute path of the file to be copied, that file will be
>>>>>>>>>>>excluded
>>>>>>>
>>>>>>>from
>>>>>>>
>>>>>>>
>>>>>>>>>>>being copied. For example, specifying a string like \obj\ or
>>>>>>>>>>>.obj
>>>>>>>
>>>>>>>will
>>>>>>>
>>>>>>>
>>>>>>>>>>>exclude all files underneath the directory obj or all files with
>>>>>
>>>>>the
>>>>>
>>>>>
>>>>>>>>>.obj
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>extension respectively."
>>>>>>>>>>>
>>>>>>>>>>>So
>>>>>>>>>>>/EXCLUDE:dontcopy.txt
>>>>>>>>>>>NOT
>>>>>>>>>>>/EXCLUDE dontcopy.txt
>>>>>>>>>>>
>>>>>>>>>>>Since where you put the file resulted in "can't read xxx", I
>>>>>
>>>>>suggest
>>>>>
>>>>>
>>>>>>>>>>>putting "dontcopy.txt" in a directory that is listed in the PATH
>>>>>>>>>
>>>>>>>>>listing.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>It's all listed in the screens above
>>>>>>>>>>>>
>>>>>>>>>>>>The donotcopy.txt contains a list - one per line - of each
>>>>>
>>>>>exclded
>>>>>
>>>>>
>>>>>>>>>file.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>>The long and short is
>>>>>>>>>>>>
>>>>>>>>>>>>xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>>>>>>>>>>>>\\receivingpath\subdirectory
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>>>>>news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>Let's see your precise command, and the contents of the
>>>>>>>>>>>>>exclude file.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>>>>>>>>>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>I've tried every permutation I can think of, and the results I
>>>>>
>>>>>get
>>>>>
>>>>>
>>>>>>>>>are:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>>>>Can't read file: XXX
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>(where XXX is whatever file comes after the "/exclude:"
>>>>>>>>>>>>>>switch.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Also, if I just try to exclude file(s) by name - a la
>>>>>>>>>
>>>>>>>>>/EXCLUDE:ABC*.fil,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>>>>I
>>>>>>>>>>>>>>get the same result...
>>>>>>>>>>>>>>Can't read file: ABC*.fil
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>What the heck is going on???
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>BINGO! We have a Winner! :-) :-)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>1) Create a notepad file
>>>>>>>>>>>>>>>>2) In the file, type:
>>>>>>>>>>>>>>>>ABC Jackson.fil
>>>>>>>>>>>>>>>>ABC Smith.fil
>>>>>>>>>>>>>>>>ABC Alias.fil
>>>>>>>>>>>>>>>>ABC Lost.fil
>>>>>>>>>>>>>>>>ABC Polar.fil
>>>>>>>>>>>>>>>>3) Save it as "filelist.txt"
>>>>>>>>>>>>>>>>4) In the xcopy command,
>>>>>>>>>>>>>>>>XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>>>>>>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>Close?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Inline,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>>>>>>>>>>>>>>>>>>cream
>>>>>>>>>>>>>
>>>>>>>>>>>>>headache.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>From your initial post, it seems as if I am creating a
>>>>>
>>>>>file -
>>>>>
>>>>>
>>>>>>>>>called
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>>>"file1"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>CORRECT
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>But I probably just want to do
>>>>>>>>>>>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Wrong, should be like this
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>>>>>>>>>>>one entry per line, you may have to experiment with it a
>>>>>>>>>>>>>>>>>bit.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>nope.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>
>>
>>
>

RJB
07-10-2005, 12:56 AM
> read everyone's posts and try following directions. Once it's working you
> can build from there.

Um, I appreciate the advice, but I HAVE been trying to follow directions. In
fact, I will go one step further, and say that I HAVE followed directions.

Kerry Brown
07-10-2005, 12:56 AM
"RJB" <notpublic@aol.com> wrote in message
news:BdKne.8224$zb.4292@trndny02...
>> read everyone's posts and try following directions. Once it's working
>> you can build from there.
>
> Um, I appreciate the advice, but I HAVE been trying to follow directions.
> In fact, I will go one step further, and say that I HAVE followed
> directions.
>

Then why haven't you tried it from a cmd prompt, while in the source
directory, with the exclude file in the source directory, with no path names
in the command line other than the destination directory? This will help to
diagnose if it is a path related problem. I suggested this and your response
was:

What do you mean "make sure [I am] explicitly in the directory"? I am
running the batch file FROM the destination laptop...

Then you went off on a tangent about the /EXCLUDE parameter.

I then posted again repeating the instructions and you said you don't know
where the file is. If you don't know where it is how do you copy it in the
first place? If it is a network share then just map a drive to that share.
You seem unable or unwilling to understand and follow directions. I'm not
trying to put you down. Diagnosing a problem by newsgroup is frustrating at
the best of times. When you keep repeating that you are following directions
when you clearly aren't it is even more frustrating.

Kerry

RJB
07-10-2005, 12:56 AM
Dude. Check the hostility.

I have confirmed in damn near every thread that I AM running from the
command prompt.

I didn't understand your "explicit" so I asked for clarification.

My ONLY problem is with the /EXCLUDE switch. So it makes sense to me to
focus on that. It is not a tangent. It IS the problem.

Since the paths are correct when the switch is not in there, I am presuming
the paths are STILL correct when it is. I can copy between directories till
my toes curl, what I can't do is exclude a list of files. Which is all I
want to do.

My comment "I don't know where it is" - I have the batch file. It is on my
desktop. When it runs, I don't know what IT considers its "explicit"
location. If I move it to any directory, I get the same result - nothing.

I have done everything everybody has suggested. I have done my best to
explain what the results were, and if I tried modifying others' suggestions,
I have tried to explain that.

But thanks, for the first time in decades, I actually feel like I'm a moron.

"Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
news:e2m2jw7ZFHA.3144@TK2MSFTNGP12.phx.gbl...
> "RJB" <notpublic@aol.com> wrote in message
> news:BdKne.8224$zb.4292@trndny02...
>>> read everyone's posts and try following directions. Once it's working
>>> you can build from there.
>>
>> Um, I appreciate the advice, but I HAVE been trying to follow directions.
>> In fact, I will go one step further, and say that I HAVE followed
>> directions.
>>
>
> Then why haven't you tried it from a cmd prompt, while in the source
> directory, with the exclude file in the source directory, with no path
> names in the command line other than the destination directory? This will
> help to diagnose if it is a path related problem. I suggested this and
> your response was:
>
> What do you mean "make sure [I am] explicitly in the directory"? I am
> running the batch file FROM the destination laptop...
>
> Then you went off on a tangent about the /EXCLUDE parameter.
>
> I then posted again repeating the instructions and you said you don't know
> where the file is. If you don't know where it is how do you copy it in the
> first place? If it is a network share then just map a drive to that
> share. You seem unable or unwilling to understand and follow directions.
> I'm not trying to put you down. Diagnosing a problem by newsgroup is
> frustrating at the best of times. When you keep repeating that you are
> following directions when you clearly aren't it is even more frustrating.
>
> Kerry
>
>

RJB
07-10-2005, 12:56 AM
You know what? Everything new ruined something before. GUI's ruined
computing as a profession? Imagine how the abacus guys feel about you.

I feel a little ownership to my problem here.

So allow me to show you the door.

Help me fix my simple /EXCLUDE problem or Go bother someone else.

Because e
"guestfromhell" <guestfromhell.1q0t2r@no-mx.forums.iamnotageek.com> wrote in
message news:guestfromhell.1q0t2r@no-mx.forums.iamnotageek.com...
>
> Pegasus \(MVP\) Wrote:
>> Your reply contains several errors and misconceptions - see below.
>>
>>
>> "guestfromhell" <guestfromhell.1pyx0r@no-mx.forums.iamnotageek.com>
>> wrote in
>> message news:guestfromhell.1pyx0r@no-mx.forums.iamnotageek.com...
>> >
>> > theres a lot of doublethink in these replies. doing 'xcopy /exclude
>> > abc*.fil 'is the same as copying them somewhere else then doin
>> 'delete
>> > abc*.fil' ,and a lot simpler.......easier to delete the one u dont
>> want
>> > rather than copy the ones u do want.................
>>
>> No it is NOT the same. The /Exclude switch ensures that the files
>> do NOT get copied. You can easily test this, by issuing a copy
>> command that would overfill a floppy disk without the /exclude
>> switch. Your own method (copy & delete) would overfill the
>> floppy disk!
>>
>> Looks like were going to get into one of thoses long boring posts where
>> one person flexes his ego in an attempt to show hes 'smarter', but here
>> goes....
>> No, YOUR wrong. Copying the wanted only is EXACTLY the same as copying
>> ALL and deleting the unwanted. Try and get your head round it, i was
>> messing with DOS when it was at DOS 2.1 and still competing with CPM
>>
>>
>>
>>
>> > DOS isnt sophisticated
>> There is no DOS under Windows. DOS is an operating system
>> as is Unix. It's the Command Prompt you're referring to,
>> and it is far more sophisticated than you would guess. If you
>> do not believe me, please explain what the following two lines
>> of code do, and why:
>> echo %date:~0,3%
>> echo %time::=-%
>> OHHHH LOOK he's set me a test!! Arent I lucky!!! Grow up, moron.
>> oh and WIn 98 was based on a DOS 6.2 kernel, so wrong again. And DOS
>> was simply a collection of device drivers with a commans 'shell' (
>> hope thats has not too mant syllabuls in it for you), it was simple and
>> powerful ,but it wasnt sophisticated it did things by brute force.
>>
>>
>>
>>
>> > its a programmers o/s
>> You probably mean "it's a programmer's o/s", with these
>> pesky apostrophes. But still, what you say is correct.
>>
>> > and tends not to pander
>> > to what became known a 'Quiche Eaters' (people who like GUI's and
>> > 'structured programming, (such as Nicklaus Wirth, the inventor of
>> > PASCAL)'
>> GUIs and structured programming have nothing in common.
>> Furthermore, the word "GUIs" requires no apostrophe, same as
>> "two dogs" requires no apostrophy, because both are plurals.
>>
>> Now here we have a smart alec with nothing better to do that criticise
>> something as trivial as where you put the apostrophe in a sentence,
>> which has nothing to do with the subject matter. In fact they are
>> connected, the common factor is that GUI's nowadays are written in
>> structured OOPS. Nicklaus WIrth was the prime apologist for for
>> structured programming and wrote a paper called 'Goto's considered
>> Harmful'. But that was WAY before your time, child.............
>>
>>
>>
>>
>> > GUI's ruined computing
>> GUIs (note: no apostrophe!) made computing accessible to
>> the masses. It's what made the Apple so popular, until Microsoft
>> pulled even.
>>
>> >, it was an arcane art up till Windows
>> > 3.11...............(starts to ramble on about punched card readers,
>> > hard sectored 8 inch floppies and MINIMAC running on a DEC 11/750)
>> >
>> > :-P
> NO GUIS's ruined computing as a profession for exactly that reason, up
> to that point you needed to know exactly what you were talking about,
> windows allowed all sorts of uptight thumb-uo-thier-arse anal types who
> didnt know squat (like you) to start dabbling. And the salaries dropped
> like a stone after that.
>
> Get a life, moron, and stuff your ego back into the barrel it came out
> of.
>
>
> --
> guestfromhell
> ------------------------------------------------------------------------
> guestfromhell's Profile:
> http://www.iamnotageek.com/member.php?userid=12490
> View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041
>

Pegasus \(MVP\)
07-10-2005, 12:56 AM
As I said before: Post your batch file and your exclude file.


"RJB" <notpublic@aol.com> wrote in message
news:qLMne.18654$Ib.6973@trndny03...
> Dude. Check the hostility.
>
> I have confirmed in damn near every thread that I AM running from the
> command prompt.
>
> I didn't understand your "explicit" so I asked for clarification.
>
> My ONLY problem is with the /EXCLUDE switch. So it makes sense to me to
> focus on that. It is not a tangent. It IS the problem.
>
> Since the paths are correct when the switch is not in there, I am
presuming
> the paths are STILL correct when it is. I can copy between directories
till
> my toes curl, what I can't do is exclude a list of files. Which is all I
> want to do.
>
> My comment "I don't know where it is" - I have the batch file. It is on my
> desktop. When it runs, I don't know what IT considers its "explicit"
> location. If I move it to any directory, I get the same result - nothing.
>
> I have done everything everybody has suggested. I have done my best to
> explain what the results were, and if I tried modifying others'
suggestions,
> I have tried to explain that.
>
> But thanks, for the first time in decades, I actually feel like I'm a
moron.
>
> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
> news:e2m2jw7ZFHA.3144@TK2MSFTNGP12.phx.gbl...
> > "RJB" <notpublic@aol.com> wrote in message
> > news:BdKne.8224$zb.4292@trndny02...
> >>> read everyone's posts and try following directions. Once it's working
> >>> you can build from there.
> >>
> >> Um, I appreciate the advice, but I HAVE been trying to follow
directions.
> >> In fact, I will go one step further, and say that I HAVE followed
> >> directions.
> >>
> >
> > Then why haven't you tried it from a cmd prompt, while in the source
> > directory, with the exclude file in the source directory, with no path
> > names in the command line other than the destination directory? This
will
> > help to diagnose if it is a path related problem. I suggested this and
> > your response was:
> >
> > What do you mean "make sure [I am] explicitly in the directory"? I am
> > running the batch file FROM the destination laptop...
> >
> > Then you went off on a tangent about the /EXCLUDE parameter.
> >
> > I then posted again repeating the instructions and you said you don't
know
> > where the file is. If you don't know where it is how do you copy it in
the
> > first place? If it is a network share then just map a drive to that
> > share. You seem unable or unwilling to understand and follow directions.
> > I'm not trying to put you down. Diagnosing a problem by newsgroup is
> > frustrating at the best of times. When you keep repeating that you are
> > following directions when you clearly aren't it is even more
frustrating.
> >
> > Kerry
> >
> >
>
>

Kerry Brown
07-10-2005, 12:56 AM
"RJB" <notpublic@aol.com> wrote in message
news:qLMne.18654$Ib.6973@trndny03...
> Dude. Check the hostility.
>
> I have confirmed in damn near every thread that I AM running from the
> command prompt.
>
> I didn't understand your "explicit" so I asked for clarification.
>
> My ONLY problem is with the /EXCLUDE switch. So it makes sense to me to
> focus on that. It is not a tangent. It IS the problem.
>
> Since the paths are correct when the switch is not in there, I am
> presuming the paths are STILL correct when it is. I can copy between
> directories till my toes curl, what I can't do is exclude a list of files.
> Which is all I want to do.
>
> My comment "I don't know where it is" - I have the batch file. It is on my
> desktop. When it runs, I don't know what IT considers its "explicit"
> location. If I move it to any directory, I get the same result - nothing.
>
> I have done everything everybody has suggested. I have done my best to
> explain what the results were, and if I tried modifying others'
> suggestions, I have tried to explain that.
>
> But thanks, for the first time in decades, I actually feel like I'm a
> moron.
>

I'm sorry if you are frustrated. I'm sorry if I appear hostile. I'm not
hostile, just frustrated, as you are. Not knowing how something works
doesn't make you a moron. I have spent hours crafting scripts to copy files
to CDRW for backups. It can be very frustrating getting it working as
expected. The key is to figure out exctly what you want to do then create a
very simple test situation. Once the test situation is working then apply it
to the original problem.

It appears you don't understand that Windows XP is not built on DOS. When a
program runs it has it's own unique environment. Because of this scripts
(batch files) often work differently than they did in earlier versions of
Windows. If you run a file from your desktop it won't have any idea where
the exclude file is located. From all the posts it sounds like this is your
problem. Usually it is simplest to have the script and any associated files
in the source directory. Make a shortcut on your desktop to run the script.

I suggest you create two temporary directories on a local drive. Keep it
very simple. e.g. C:\TEMP1 and C:\TEMP2.

Copy the files to TEMP1.

Create the exclude file in TEMP1. Call it EXCLUDE.TXT.

Start a cmd prompt and navigate to TEMP1 so that the prompt in the cmd
window looks like this C:\TEMP1>.

Type "XCOPY C:*.* C:\TEMP2\ /EXCLUDE;EXCLUDE.TXT". Without the quotations
and trailing period.

Keep it very simple, maybe one line in EXCLUDE.TXT that only excludes one
file. Make sure to keep the batch file and the exclude file in the source
directory. See if that works. If it doesn't work report back. There is some
other problem. If it does then you have to figure out how to apply this to
your situation.

It appears you don't understand that Windows XP is not built on DOS. I say
this because DOS and earlier versions of Windows used .bat files. Win2K and
XP use .cmd files usually called scripts. For compatibilty XP will run .bat
files the same as .cmd files. It really doesn't matter what you call them,
they should work. When a program runs it has it's own unique environment.
Because of this scripts often work differently than they did in earlier
versions of Windows. If you run a file from your desktop it won't have any
idea where the exclude file is located. From all the posts it sounds like
this is your problem. Usually it is simplest to have the script and any
associated files in the source directory. Make a shortcut to the batch file
on your desktop to run the script.

Kerry

> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
> news:e2m2jw7ZFHA.3144@TK2MSFTNGP12.phx.gbl...
>> "RJB" <notpublic@aol.com> wrote in message
>> news:BdKne.8224$zb.4292@trndny02...
>>>> read everyone's posts and try following directions. Once it's working
>>>> you can build from there.
>>>
>>> Um, I appreciate the advice, but I HAVE been trying to follow
>>> directions. In fact, I will go one step further, and say that I HAVE
>>> followed directions.
>>>
>>
>> Then why haven't you tried it from a cmd prompt, while in the source
>> directory, with the exclude file in the source directory, with no path
>> names in the command line other than the destination directory? This will
>> help to diagnose if it is a path related problem. I suggested this and
>> your response was:
>>
>> What do you mean "make sure [I am] explicitly in the directory"? I am
>> running the batch file FROM the destination laptop...
>>
>> Then you went off on a tangent about the /EXCLUDE parameter.
>>
>> I then posted again repeating the instructions and you said you don't
>> know where the file is. If you don't know where it is how do you copy it
>> in the first place? If it is a network share then just map a drive to
>> that share. You seem unable or unwilling to understand and follow
>> directions. I'm not trying to put you down. Diagnosing a problem by
>> newsgroup is frustrating at the best of times. When you keep repeating
>> that you are following directions when you clearly aren't it is even more
>> frustrating.
>>
>> Kerry
>>
>>
>
>

RJB
07-10-2005, 12:57 AM
There is clearly a disconnect.

I have posted this all before.

Or is there something I am missing?

XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
/EXCLUDE:NOCOPYLIST.TXT "C:\RECEIVE\"

Where NOCOPYLIST.TXT contains:

ABC Jackson.fil
ABC Smith.fil
ABC Alias.fil
ABC Polar.fil


I have also run it with DONTCOPY.TXT in the EXCLUDE command, where
DONTCOPY.TXT contains:
"ABC Jackson.fil"
"ABC Smith.fil"
"ABC Alias.fil"
"ABC Polar.fil"

And also
"G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Jackson.fil"
"G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Smith.fil"
"G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Alias.fil"
"G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Polar.fil"

I have also run
XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
/EXCLUDE:"G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOMNOCOPYLIST.TXT
" "C:\RECEIVE\"



"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:%232I1EH9ZFHA.616@TK2MSFTNGP12.phx.gbl...
> As I said before: Post your batch file and your exclude file.
>
>
> "RJB" <notpublic@aol.com> wrote in message
> news:qLMne.18654$Ib.6973@trndny03...
>> Dude. Check the hostility.
>>
>> I have confirmed in damn near every thread that I AM running from the
>> command prompt.
>>
>> I didn't understand your "explicit" so I asked for clarification.
>>
>> My ONLY problem is with the /EXCLUDE switch. So it makes sense to me to
>> focus on that. It is not a tangent. It IS the problem.
>>
>> Since the paths are correct when the switch is not in there, I am
> presuming
>> the paths are STILL correct when it is. I can copy between directories
> till
>> my toes curl, what I can't do is exclude a list of files. Which is all I
>> want to do.
>>
>> My comment "I don't know where it is" - I have the batch file. It is on
>> my
>> desktop. When it runs, I don't know what IT considers its "explicit"
>> location. If I move it to any directory, I get the same result - nothing.
>>
>> I have done everything everybody has suggested. I have done my best to
>> explain what the results were, and if I tried modifying others'
> suggestions,
>> I have tried to explain that.
>>
>> But thanks, for the first time in decades, I actually feel like I'm a
> moron.
>>
>> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
>> news:e2m2jw7ZFHA.3144@TK2MSFTNGP12.phx.gbl...
>> > "RJB" <notpublic@aol.com> wrote in message
>> > news:BdKne.8224$zb.4292@trndny02...
>> >>> read everyone's posts and try following directions. Once it's
>> >>> working
>> >>> you can build from there.
>> >>
>> >> Um, I appreciate the advice, but I HAVE been trying to follow
> directions.
>> >> In fact, I will go one step further, and say that I HAVE followed
>> >> directions.
>> >>
>> >
>> > Then why haven't you tried it from a cmd prompt, while in the source
>> > directory, with the exclude file in the source directory, with no path
>> > names in the command line other than the destination directory? This
> will
>> > help to diagnose if it is a path related problem. I suggested this and
>> > your response was:
>> >
>> > What do you mean "make sure [I am] explicitly in the directory"? I am
>> > running the batch file FROM the destination laptop...
>> >
>> > Then you went off on a tangent about the /EXCLUDE parameter.
>> >
>> > I then posted again repeating the instructions and you said you don't
> know
>> > where the file is. If you don't know where it is how do you copy it in
> the
>> > first place? If it is a network share then just map a drive to that
>> > share. You seem unable or unwilling to understand and follow
>> > directions.
>> > I'm not trying to put you down. Diagnosing a problem by newsgroup is
>> > frustrating at the best of times. When you keep repeating that you are
>> > following directions when you clearly aren't it is even more
> frustrating.
>> >
>> > Kerry
>> >
>> >
>>
>>
>
>

Pegasus \(MVP\)
07-10-2005, 12:57 AM
I have never seen this before. Still, we're finally getting somewhere.
Please create a batch file like so:

Line1 @echo off
Line2 echo %date% %time% User=%UserName%, Path=%path% > c:\report.txt
Line3 XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
/EXCLUDE:"c:\SomeFolder\NOCOPYLIST.TXT" "C:\RECEIVE\" 1>> c:\report.txt
2>c:\report.err
Line4 echo Errorlevel of xcopy.exe=%ErrorLevel
Line5 dir "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM" >>
c:\report.txt
Line6 dir c:\rec*.* >> c:\report.txt
Line7 dir "c:\SomeFolder\NOCOPYLIST.TXT" >> c:\report.txt
Line8 type "c:\SomeFolder\NOCOPYLIST.TXT" >> c:\report.txt

Instructions:
1. Paste the above lines into your batch file. Do not retype them!
2. Change c:\SomeFolder in lines 3, 7 and 8 to reflect the actual location
of your exclusion list.
3. Remove each and every line number.
4. Save and run this batch file.
5. Paste the contents of c:\report.txt and c:\report.err into your reply.


"RJB" <notpublic@aol.com> wrote in message
news:PMPne.26271$Ub.16935@trndny09...
> There is clearly a disconnect.
>
> I have posted this all before.
>
> Or is there something I am missing?
>
> XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
> /EXCLUDE:NOCOPYLIST.TXT "C:\RECEIVE\"
>
> Where NOCOPYLIST.TXT contains:
>
> ABC Jackson.fil
> ABC Smith.fil
> ABC Alias.fil
> ABC Polar.fil
>
>
> I have also run it with DONTCOPY.TXT in the EXCLUDE command, where
> DONTCOPY.TXT contains:
> "ABC Jackson.fil"
> "ABC Smith.fil"
> "ABC Alias.fil"
> "ABC Polar.fil"
>
> And also
> "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Jackson.fil"
> "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Smith.fil"
> "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Alias.fil"
> "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\ABC Polar.fil"
>
> I have also run
> XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
>
/EXCLUDE:"G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOMNOCOPYLIST.TX
T
> " "C:\RECEIVE\"
>
>
>
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:%232I1EH9ZFHA.616@TK2MSFTNGP12.phx.gbl...
> > As I said before: Post your batch file and your exclude file.
> >
> >
> > "RJB" <notpublic@aol.com> wrote in message
> > news:qLMne.18654$Ib.6973@trndny03...
> >> Dude. Check the hostility.
> >>
> >> I have confirmed in damn near every thread that I AM running from the
> >> command prompt.
> >>
> >> I didn't understand your "explicit" so I asked for clarification.
> >>
> >> My ONLY problem is with the /EXCLUDE switch. So it makes sense to me to
> >> focus on that. It is not a tangent. It IS the problem.
> >>
> >> Since the paths are correct when the switch is not in there, I am
> > presuming
> >> the paths are STILL correct when it is. I can copy between directories
> > till
> >> my toes curl, what I can't do is exclude a list of files. Which is all
I
> >> want to do.
> >>
> >> My comment "I don't know where it is" - I have the batch file. It is on
> >> my
> >> desktop. When it runs, I don't know what IT considers its "explicit"
> >> location. If I move it to any directory, I get the same result -
nothing.
> >>
> >> I have done everything everybody has suggested. I have done my best to
> >> explain what the results were, and if I tried modifying others'
> > suggestions,
> >> I have tried to explain that.
> >>
> >> But thanks, for the first time in decades, I actually feel like I'm a
> > moron.
> >>
> >> "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
> >> news:e2m2jw7ZFHA.3144@TK2MSFTNGP12.phx.gbl...
> >> > "RJB" <notpublic@aol.com> wrote in message
> >> > news:BdKne.8224$zb.4292@trndny02...
> >> >>> read everyone's posts and try following directions. Once it's
> >> >>> working
> >> >>> you can build from there.
> >> >>
> >> >> Um, I appreciate the advice, but I HAVE been trying to follow
> > directions.
> >> >> In fact, I will go one step further, and say that I HAVE followed
> >> >> directions.
> >> >>
> >> >
> >> > Then why haven't you tried it from a cmd prompt, while in the source
> >> > directory, with the exclude file in the source directory, with no
path
> >> > names in the command line other than the destination directory? This
> > will
> >> > help to diagnose if it is a path related problem. I suggested this
and
> >> > your response was:
> >> >
> >> > What do you mean "make sure [I am] explicitly in the directory"? I am
> >> > running the batch file FROM the destination laptop...
> >> >
> >> > Then you went off on a tangent about the /EXCLUDE parameter.
> >> >
> >> > I then posted again repeating the instructions and you said you don't
> > know
> >> > where the file is. If you don't know where it is how do you copy it
in
> > the
> >> > first place? If it is a network share then just map a drive to that
> >> > share. You seem unable or unwilling to understand and follow
> >> > directions.
> >> > I'm not trying to put you down. Diagnosing a problem by newsgroup is
> >> > frustrating at the best of times. When you keep repeating that you
are
> >> > following directions when you clearly aren't it is even more
> > frustrating.
> >> >
> >> > Kerry
> >> >
> >> >
> >>
> >>
> >
> >
>
>

RJB
07-10-2005, 12:57 AM
This is the first anyone mentioned moving the batch file itself.

Great day in the morning, I think it's working.


Usually it is simplest to have the script and any associated files
in the source directory. Make a shortcut on your desktop to run the script.

Kerry Brown
07-10-2005, 12:57 AM
"RJB" <notpublic@aol.com> wrote in message
news:VJQne.8843$Fb.4037@trndny07...
> This is the first anyone mentioned moving the batch file itself.
>
> Great day in the morning, I think it's working.
>
>
> Usually it is simplest to have the script and any associated files
> in the source directory. Make a shortcut on your desktop to run the
> script.
>
>

They don't have to be there. I usually set up a directory just for scripts
and their associated files. When debugging it's easier to have everything in
the source directory until you get it working. Once it's working you can
move things around and edit the path to reflect the new locations.

Kerry

guestfromhell
07-10-2005, 12:57 AM
>You know what? Everything new ruined something before. GUI's ruined
>computing as a profession? Imagine how the abacus guys feel about
you.
>
>I feel a little ownership to my problem here.
>
>So allow me to show you the door.
>
>Help me fix my simple /EXCLUDE problem or Go bother someone else.


Well guess what - this is a public forum, you don't own squat.

As for this guys copy problem, its easy, as I said. Copy the whole
subdir somewhere else then delete the bits you dont want with a
wildcard, then copy it to its final resting place. You can even write a
3 line batch file to do it if you like. Much easier than getting your
neck round obscure parameters.

Computing works best on Occams Razor - the simplest solution is always
the best.


--
guestfromhell
------------------------------------------------------------------------
guestfromhell's Profile: http://www.iamnotageek.com/member.php?userid=12490
View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041

RJB
07-10-2005, 12:57 AM
2 New catches.

With the .bat in the source directory, it ran fine.

With a shortcut moved to the remote (destination) computer, I get

'\\RJBDESKTOP\SHAREDDOCS\MAILROOM'
CMD.EXE was started with the above path as the current directroy.
UNC paths are not supported. Defaulting to Windows directory.
------

Also, if I go back to running it from the source directory, we were cool
with excluding ONE file.

When I add the whole list, it only excludes the file from the FIRST line of
nocopy.txt.

Do I need to do a separate file for each? i.e., nocopyABC.txt,
nocopyDEF.txt,

and then

/EXCLUDE:nocopyABC.txt[nocopyDEF.txt]

?




"Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
news:urBp4Q$ZFHA.4020@TK2MSFTNGP09.phx.gbl...
> "RJB" <notpublic@aol.com> wrote in message
> news:VJQne.8843$Fb.4037@trndny07...
>> This is the first anyone mentioned moving the batch file itself.
>>
>> Great day in the morning, I think it's working.
>>
>>
>> Usually it is simplest to have the script and any associated files
>> in the source directory. Make a shortcut on your desktop to run the
>> script.
>>
>>
>
> They don't have to be there. I usually set up a directory just for scripts
> and their associated files. When debugging it's easier to have everything
> in the source directory until you get it working. Once it's working you
> can move things around and edit the path to reflect the new locations.
>
> Kerry
>
>

Torgeir Bakken \(MVP\)
07-10-2005, 12:57 AM
RJB wrote:

> 2 New catches.
>
> With the .bat in the source directory, it ran fine.
>
> With a shortcut moved to the remote (destination) computer, I get
>
> '\\RJBDESKTOP\SHAREDDOCS\MAILROOM'
> CMD.EXE was started with the above path as the current directroy.
> UNC paths are not supported. Defaulting to Windows directory.
> ------

Put this in the top of the batch file (will map a temporary drive
letter to the path where the batch file is located, and make it
current directory):

pushd "%~dp0"


Put this at the bottom of the batch file:

popd


> Also, if I go back to running it from the source directory, we were cool
> with excluding ONE file.
>
> When I add the whole list, it only excludes the file from the FIRST line of
> nocopy.txt.
>
> Do I need to do a separate file for each? i.e., nocopyABC.txt,
> nocopyDEF.txt,
>
> and then
>
> /EXCLUDE:nocopyABC.txt[nocopyDEF.txt]


If I put several file names in the NOCOPYLIST.TXT file (each name on
it's own line), they are all excluded from the copying, so no, you do
not need separate files for each file name.


--
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/scriptcenter/default.mspx

Kerry Brown
07-10-2005, 12:57 AM
"RJB" <notpublic@aol.com> wrote in message
news:qCWne.12210$zb.10737@trndny02...
>2 New catches.
>
> With the .bat in the source directory, it ran fine.
>
> With a shortcut moved to the remote (destination) computer, I get
>
> '\\RJBDESKTOP\SHAREDDOCS\MAILROOM'
> CMD.EXE was started with the above path as the current directroy.
> UNC paths are not supported. Defaulting to Windows directory.
> ------

You will need to map a drive to the share.

>
> Also, if I go back to running it from the source directory, we were cool
> with excluding ONE file.
>
> When I add the whole list, it only excludes the file from the FIRST line
> of nocopy.txt.
>
> Do I need to do a separate file for each? i.e., nocopyABC.txt,
> nocopyDEF.txt,
>
> and then
>
> /EXCLUDE:nocopyABC.txt[nocopyDEF.txt]
>
> ?
>

Please post the contents of nocopy.txt

Kerry





"Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message
> news:urBp4Q$ZFHA.4020@TK2MSFTNGP09.phx.gbl...
>> "RJB" <notpublic@aol.com> wrote in message
>> news:VJQne.8843$Fb.4037@trndny07...
>>> This is the first anyone mentioned moving the batch file itself.
>>>
>>> Great day in the morning, I think it's working.
>>>
>>>
>>> Usually it is simplest to have the script and any associated files
>>> in the source directory. Make a shortcut on your desktop to run the
>>> script.
>>>
>>>
>>
>> They don't have to be there. I usually set up a directory just for
>> scripts
>> and their associated files. When debugging it's easier to have everything
>> in the source directory until you get it working. Once it's working you
>> can move things around and edit the path to reflect the new locations.
>>
>> Kerry
>>
>>
>
>
>

Bob I
07-10-2005, 12:57 AM
Inline

RJB wrote:

> Is the /EXCLUDE maybe something that's broken? Is XCOPY a "command" or a
> "program" that I can reinstall?
>
> I have been running mostly from command instead of batch, for reasons I
> posted somewhere else in a fit of confusion.
>
> Your Suggestion 1: Are you suggesting that I should have an entire line in
> my DONTCOPY.TXT that is simply
>
> ABC
>
> and that will automatically wildcard it?
>

Yes, ANY FILE in the source directory containing ABC in the filename
will not be copied.

>
> Your suggestions 3: Are you suggesting I move my exclude file to say,
> "c:\DONTCOPY.TXT"?

For whatever reason "path length", "mapping" or whatever the file is not
being read/found where it is. So
I am suggesting you place it in root of C: and make

/EXCLUDE:C:\DONTCOPY.txt

So as to ensure it is where it can be accessed.


> I want to be sure I understand the logic of what we're doing:
> I have a subdirectory called "MAILROOM".
> It is on my desktop machine "RJBDESKTOP".
> MAILROOM contains a bunch of files. Several of them change daily (let's call
> them the "Penske Files"), and some are specific to and must be resident on
> the host machine (the "ABC" files). Sometimes I am working from my laptop,
> sometimes at my desktop.
> I would like to have access to the Penske files whilst on the road and
> gotomypc is unavailable.
> So, I want to XCOPY MAILROOM from my desktop to my laptop.
> That will copy the entire contents, subdirectories and all, from MAILROOM to
> my laptop.
> It is OK if desktop Penske Files overwrite laptop Penske Files.
> So I put the /y switch in, to say "[Y]es, please overwrite"
> But I specifically don't want the ABC files to copy. Because I DON'T want
> the desktop ABC files to overwrite the laptop ABC files.
> So I launched notepad.exe
> And I typed the name of each ABC file, one per line.
> And I saved it as NOCOPYLIST.TXT
> So I want to EXCLUDE NOCOPYLIST.TXT from the XCOPY
> And the command for that is /EXCLUDE:NOCOPYLIST.TXT
>
> So the overriding command is
> XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
> /EXCLUDE:NOCOPYLIST.TXT "C:\RECEIVE\"
>
>


So now "DONTCOPY.TXT" contains 2 lines

ABC
Penske

Then finally try using this format(altho switch order shouldn't matter).

XCOPY source destination /Y /EXCLUDE

So the comand would look like this

XCOPY G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM\*.*
C:\RECEIVE\*.* /Y /EXCLUDE:C:\DONTCOPY.TXT

result will be NO "ABC*.*" or "*Penske*.*" files appearing at the
destination.



>
>
> Again, I get the error message "Can't read file: "NOCOPYLIST.TXT""
> If I run
> XCOPY /y "G:\LEDBER\USERS\OPERATIONS\RJ_doe\SHAREDDOCS\MAILROOM"
> "C:\RECEIVE\"
> The ABC and Penske files do indeed copy.
>
>
>
> "Bob I" <birelan@yahoo.com> wrote in message
> news:OBlBXi6ZFHA.2796@TK2MSFTNGP10.phx.gbl...
>
>>Messing around I discovered that
>>1. * or "wildcards" are not read as wildcards. Everything in the string is
>>literal.
>>2. Was unsuccessful at reproducing the Can't read file" error.
>>
>>Suggest
>>1. Using just ABC as the criteria in the DONTCOPY.TXT file.
>>2. Try running from the command line rather than batch file till it works.
>>3. Try using shorter path or local drive for the exclude file.
>>
>>RJB wrote:
>>
>>
>>>Done that.
>>>
>>>Done it three ways:
>>>
>>>1) Listing each file on its own line
>>>2) Listing each file, with its full path, on its own line
>>>3) (What I'd prefer) Going back to my original examples, "ABC*.fil".
>>>
>>>(Now, granted, they are not literally "ABC Jackson.fil" etc., but the
>>>file names DO include proprietary information, and I can't post the
>>>actual file names here. Suffice to say they all are the same extensions,
>>>and the ones I wish to exclude ALL begin with the same three letters!)
>>>
>>>And, to be avoid typos, I am highlighting the file, choosing Properties,
>>>highlighting the file's name, COPYing it, and PASTEing it into the
>>>Notepad file!
>>>
>>>If I delete the /EXCLUDE switch, the whole subdirectory copies, so I know
>>>my path is correct.
>>>
>>>I continue to get "Can't read file:" \\G:\LEDBER\USERS\OPERATIONS\RJ_(My
>>>last name)\SHAREDDOCS\MAILROOM\nocopylist.txt"" <=(I created a new
>>>Notepad file and called it nocopylist.txt) (And for the rock and roll
>>>grammar patrol folks, I KNOW I shouldn't put double-quotes inside double
>>>quotes, but I sure don't want anyone to get bogged down if I used single
>>>quotes!)
>>>
>>>"Can't read file"
>>>
>>>I believe my commands are correct... It's the "Can't read file"
>>>nonsense....
>>>
>>>
>>>
>>>
>>>"Bob I" <birelan@yahoo.com> wrote in message
>>>news:eiKiF%234ZFHA.1448@TK2MSFTNGP09.phx.gbl...
>>>
>>>
>>>>Plain and simple. The "FILE"(dontcopy.txt) placed after /EXCLUDE MUST BE
>>>>A PLAIN TEXT FILE. Open NOTEPAD and put in the contents. The file types
>>>>called out or listed in "dontcopy.txt" can be any type of file there ever
>>>>was including unknown types because the only thing that is READ is the
>>>>"dontcopy.txt" file and it MUST BE plain text and ONE entry per line. If
>>>>you are using word or wordpad or wordperfect to make the exclude file,
>>>>DON'T. Use NOTEPAD and ONLY NOTEPAD. Remember XCOPY reads the file
>>>>containing the list of files to be excluded. If it's NOT PLAIN TEXT, it's
>>>>not going to work.
>>>>
>>>>RJB wrote:
>>>>
>>>>
>>>>
>>>>>OK, I know you're trying to be helpful, but it's getting kind of tough.
>>>>>
>>>>>Trust me that I have spent hours - in batch file and just typing
>>>>>commands in at the command prompt - and no matter what I do, I am
>>>>>getting the "can't read" message.
>>>>>
>>>>>I am running in command prompt for two reasons: one is, I am tired of
>>>>>opening the file, typing it, and saving it, when I can just run directly
>>>>>in cmd.exe. Second, I don't get error messages when I run the batch. It
>>>>>either works or it doesn't, and then the batch file closes. At least
>>>>>when I run cmd.exe, I can read each error message as I go.
>>>>>
>>>>>I HAVE shown you the exact command I am attempting to run, to the best
>>>>>of my ability. Since I have no way of copying from the command prompt to
>>>>>my web browser, I must retype the commands. I am sorry for the few typos
>>>>>in the translation. And, I have discovered that if I post in newsgroups
>>>>>directly, my spell check has flubbed some things as well.
>>>>>
>>>>
>>>>>From what I have found in xcopy /?, it tells me that the /EXCLUDE switch
>>>>
>>>>>should work with ANY file, not just text files.
>>>>>
>>>>>If it could be solved in less than a minute, it would have been. I am
>>>>>sorry if turning to Microsoft help is not the answer. It was my first
>>>>>line of defense.
>>>>>
>>>>>I have tried to answer every single question you have asked as carefuly
>>>>>and as completely as possible. Again, my apologies for not being able to
>>>>>anticipate the unasked and give you full open kimono.
>>>>>
>>>>>The only difference between what I have continually typed and what is on
>>>>>my command prompt is that \\SOURCEPATH\SHAREDDOCS\ is actually
>>>>>G:\\LEDBER\USERS\OPERATIONS\RJ_(My last name)\SHAREDDOCS\ and I didn't
>>>>>really feel it was necessary to type that over and over again, when I
>>>>>presumed we could understand \\SOURCEPATH\
>>>>>
>>>>>I do appreciate your trying to help. I have tried everything you have
>>>>>said, along with every other permutation I could think of.
>>>>>
>>>>>**** No matter what I do, I get "Can't read file."
>>>>>
>>>>>It ain't trivial to me.
>>>>>
>>>>>
>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>news:uVdpUS4ZFHA.3364@TK2MSFTNGP09.phx.gbl...
>>>>>
>>>>>
>>>>>
>>>>>>This is a curious thread in that we keep running into two types
>>>>>>of problems:
>>>>>>- You quote generic commands that have some character
>>>>>>misplaced (first a colon, then a double quote), and then
>>>>>>you say that this was not the real command anyway.
>>>>>>- In spite of several encouragements, you never show us the
>>>>>>real command you're using.
>>>>>>
>>>>>>Your latest reply is no exception: Again you do not show us what
>>>>>>you've done - you only report the problems.
>>>>>>
>>>>>>I might add that your task is utterly trivial. I can be solved in less
>>>>>>than a minute by someone who pays attention to standard batch
>>>>>>file conventions.
>>>>>>
>>>>>>Unless you agree to show us what you have written (i.e. the
>>>>>>verbatim contents of your batch file plus the contents of your
>>>>>>"exclude" file), I will stop responding in this thread. Its length
>>>>>>is badly out of proportion with the triviality of the problem.
>>>>>>There is nothing sophisticated about it!
>>>>>>
>>>>>>
>>>>>>
>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>news:W_Ene.8790$Fb.2500@trndny07...
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Thanks. The .bmp attempt was to test if the exclude command was
>>>>>>>working,
>>>>>>
>>>>>>and
>>>>>>
>>>>>>
>>>>>>
>>>>>>>something was wrong with the .txt file setup.
>>>>>>>
>>>>>>>(I thought if I excluded ONE file, then I would prove that /EXCLUDE
>>>>>>>was
>>>>>>>working... And the .txt file was the problem. I didn't realize EXCLUDE
>>>>>>
>>>>>>MUST
>>>>>>
>>>>>>
>>>>>>
>>>>>>>be a .txt file... I thought that was only to exclude a series of
>>>>>>>files...
>>>>>>>For just one file of any kind, I presumed you could exclude that. Do
>>>>>>>you
>>>>>>>understand what I was trying?)
>>>>>>>
>>>>>>>As you can see from my first line in this reply, I am still getting
>>>>>>>the
>>>>>>>error... "Can't read file".
>>>>>>>
>>>>>>>And the quotes were quotes meaning, "Hey, everything between the
>>>>>>>quotes is
>>>>>>>what I typed for a command". I thought I only needed quotation marks
>>>>>>>on
>>>>>>
>>>>>>the
>>>>>>
>>>>>>
>>>>>>
>>>>>>>actual command line if I was using the 'long' file and path names from
>>>>>>>Windows rather than the traditional DOS-tastic 8 character path name.
>>>>>>>
>>>>>>>So I am still where I started.
>>>>>>>
>>>>>>>(And I don't want to copy everything and delete. Eventually, there
>>>>>>>will be
>>>>>>>files in the source and destination directories that are different,
>>>>>>>but
>>>>>>
>>>>>>will
>>>>>>
>>>>>>
>>>>>>
>>>>>>>have the same name! THOSE are the very files I need to exclude from
>>>>>>
>>>>>>copying!
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I think what I may do is:
>>>>>>>
>>>>>>>MOVE \\SOURCE\Files_to_exclude.* \\SOURCE\NEWSUBDIR
>>>>>>>Copy \\SOURCE\*.*
>>>>>>>MOVE \\SOURCE\NEWSUBDIR\Files_to_exclude.* \\SOURCE
>>>>>>>
>>>>>>>and call it a day!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>news:OHPF4kxZFHA.1368@tk2msftngp13.phx.gbl...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>You need to be a little more careful with your code, especially
>>>>>>>>if you want to do "Sophisticated copying" (your Subject line).
>>>>>>>>I wrote this:
>>>>>>>>
>>>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt"
>>>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp"
>>>>>>>>
>>>>>>>>There are two obvious problems with your code:
>>>>>>>>- You shifted the first quote to the beginning of the line. Makes no
>>>>>>
>>>>>>sense
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>whatsoever!
>>>>>>>>- You quote a .bmp file after the exclude switch. On several previous
>>>>>>>>occasions in this thread it was pointed out that the file after the
>>>>>>>>/exclude switch must be a text file containing a list of files to be
>>>>>>>>excluded. It cannot be a .bmp file!
>>>>>>>>
>>>>>>>>
>>>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>>>news:SPpne.8594$Fb.2545@trndny07...
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>STILL a "Can't read file
>>>>>>
>>>>>>\\SOURCEDRIVE\Shareddocs\Mailroom\dontcopy.txt"
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>I know the "path" is OK, because if I exclude the "/EXCLUDE:" line,
>>>>>>>>>it
>>>>>>>>>copies everything.
>>>>>>>>>
>>>>>>>>>Also, I tried the line with an
>>>>>>>>>"/EXCLUDE:\\Sourcedrive\Shareddocs\Mailroom\grace.bmp" - a picture
>>>>>>>>>of
>>>>>>
>>>>>>my
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>dog - and still got the "Can't read file ...grace.bmp"
>>>>>>>>>
>>>>>>>>>So, it appears to be something it's not liking about "Exclude"?
>>>>>>>>>
>>>>>>>>>Arggggghhhhh!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>>news:uMW$1KjZFHA.1384@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>With your "path" command you wrecked your existing path! The
>>>>>>>>>>correct way would be to type this:
>>>>>>>>>>
>>>>>>>>>>path %path%;\\SourceDrive\ShareDocs.
>>>>>>>>>>
>>>>>>>>>>However . . . adding SourceDrive\ShareDocs to the path makes no
>>>>>>>>>>sense, because SourceDrive\ShareDocs contains no executable
>>>>>>>>>>programs. The path is used to locate executable programs, not data
>>>>>>>>>>files.
>>>>>>>>>>
>>>>>>>>>>Here is what you should type:
>>>>>>>>>>
>>>>>>>>>>xcopy /y "\\SOURCEDRIVE\SHAREDDOCS\MAILROOM"
>>>>>>>>>>/EXCLUDE:"\\SourceDrive\ShareDocs\dontcopy.txt" "C:\RECEIVE\"
>>>>>>>>>>
>>>>>>>>>>This is all one long line. Note the "/y" switch, the trailing
>>>>>>
>>>>>>backslash
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>>after "c:\Receive\", and the sets of double quotes. Depending on
>>>>>>>>>>your actual names, they could be essential.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>"RJB" <notpublic@aol.com> wrote in message
>>>>>>>>>>news:qg5ne.5780$Lb.1073@trndny05...
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>I added
>>>>>>>>>>>PATH \\SOURCEDRIVE\SHAREDDOCS
>>>>>>>>>>>
>>>>>>>>>>>And now get
>>>>>>>>>>> 'xcopy' is not recognized as an internal or external command,
>>>>>>>>>>> operable program or batch file
>>>>>>>>>>>
>>>>>>>>>>>I guess I should have added %PATH% \\SOURCEDRIVE\SHAREDDOCS?
>>>>>>>>>>>
>>>>>>>>>>>btw, here is the full command in my batch file:
>>>>>>>>>>>
>>>>>>>>>>>XCOPY \\SOURCEDRIVE\SHAREDDOCS\MAILROOM /EXCLUDE:dontcopy.txt
>>>>>>>>
>>>>>>>>C:\RECEIVE
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>My goal is to take all of the files (save the five listed in
>>>>>>>>>>>"dontcopy.txt"!) and copy them from a subdirectory called
>>>>>>>>>>>"Mailroom"
>>>>>>>>>>>on
>>>>>>>>>>>my
>>>>>>>>>>>server to a subdirectory called "Receive" on my laptop.
>>>>>>>>>>>
>>>>>>>>>>>(The file "dontcopy.txt" is in \\SOURCEDRIVE\SHAREDDOCS\MAILROOM)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>Thanks,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>"Bob I" <birelan@yahoo.com> wrote in message
>>>>>>>>>>>news:OFKA7WsYFHA.712@TK2MSFTNGP14.phx.gbl...
>>>>>>>>>>>
>>>>>>>>>>>>From the help
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>" /EXCLUDE:file1[+file2][+file3]...
>>>>>>>>>>>>Specifies a list of files containing strings. Each string should
>>>>>>
>>>>>>be
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>in
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>>a
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>separate line in the files. When any of the strings match any
>>>>>>
>>>>>>part
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>of
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>>the
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>absolute path of the file to be copied, that file will be
>>>>>>>>>>>>excluded
>>>>>>>>
>>>>>>>>from
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>>being copied. For example, specifying a string like \obj\ or
>>>>>>>>>>>>.obj
>>>>>>>>
>>>>>>>>will
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>>exclude all files underneath the directory obj or all files with
>>>>>>
>>>>>>the
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>>.obj
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>extension respectively."
>>>>>>>>>>>>
>>>>>>>>>>>>So
>>>>>>>>>>>>/EXCLUDE:dontcopy.txt
>>>>>>>>>>>>NOT
>>>>>>>>>>>>/EXCLUDE dontcopy.txt
>>>>>>>>>>>>
>>>>>>>>>>>>Since where you put the file resulted in "can't read xxx", I
>>>>>>
>>>>>>suggest
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>>>>putting "dontcopy.txt" in a directory that is listed in the PATH
>>>>>>>>>>
>>>>>>>>>>listing.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>It's all listed in the screens above
>>>>>>>>>>>>>
>>>>>>>>>>>>>The donotcopy.txt contains a list - one per line - of each
>>>>>>
>>>>>>exclded
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>>file.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>The long and short is
>>>>>>>>>>>>>
>>>>>>>>>>>>>xcopy \\destinationpath\subdir /EXCLUDE donotcopy.txt
>>>>>>>>>>>>>\\receivingpath\subdirectory
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>"Pegasus (MVP)" <I.can@fly.com> wrote in message
>>>>>>>>>>>>>news:OsRQprkYFHA.3188@TK2MSFTNGP09.phx.gbl...
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>Let's see your precise command, and the contents of the
>>>>>>>>>>>>>>exclude file.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>"RJB" <RJB@discussions.microsoft.com> wrote in message
>>>>>>>>>>>>>>news:8E2C8AD9-6297-41BA-8154-8EF2CFE8DE01@microsoft.com...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>I've tried every permutation I can think of, and the results I
>>>>>>
>>>>>>get
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>>are:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>>>Can't read file: XXX
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>(where XXX is whatever file comes after the "/exclude:"
>>>>>>>>>>>>>>>switch.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>The "donotcopy.txt" file is in the SOURCE directory, correct?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>Also, if I just try to exclude file(s) by name - a la
>>>>>>>>>>
>>>>>>>>>>/EXCLUDE:ABC*.fil,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>>>I
>>>>>>>>>>>>>>>get the same result...
>>>>>>>>>>>>>>>Can't read file: ABC*.fil
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>0 File(s) copied
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>What the heck is going on???
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>BINGO! We have a Winner! :-) :-)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>At the risk of being redundantly monotonous and obtuse:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>1) Create a notepad file
>>>>>>>>>>>>>>>>>2) In the file, type:
>>>>>>>>>>>>>>>>>ABC Jackson.fil
>>>>>>>>>>>>>>>>>ABC Smith.fil
>>>>>>>>>>>>>>>>>ABC Alias.fil
>>>>>>>>>>>>>>>>>ABC Lost.fil
>>>>>>>>>>>>>>>>>ABC Polar.fil
>>>>>>>>>>>>>>>>>3) Save it as "filelist.txt"
>>>>>>>>>>>>>>>>>4) In the xcopy command,
>>>>>>>>>>>>>>>>>XCOPY \\PATH\SOURCE_SUBDIRECTORY /EXCLUDE filelist.txt
>>>>>>>>>>>>>>>>>\\PATH\TARGET_SUBDIRECTORY /d /h /p /r /u /k /y
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>Close?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>"Bob I" wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Inline,
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>RJB wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>Yeah, I gotta say, Pegasus, your solution gives me an ice
>>>>>>>>>>>>>>>>>>>cream
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>headache.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>I still don't know if I get the "file listing" info...
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>From your initial post, it seems as if I am creating a
>>>>>>
>>>>>>file -
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>>called
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>>"file1"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>- and in that file it includes a list of excluded files.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>CORRECT
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>But I probably just want to do
>>>>>>>>>>>>>>>>>>>/EXCLUDE ABC*.fil
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>Wrong, should be like this
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>XCOPY /EXCLUDE FILELIST.TXT
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>FILELIST.TXT contents are ABC*.fil
>>>>>>>>>>>>>>>>>>one entry per line, you may have to experiment with it a
>>>>>>>>>>>>>>>>>>bit.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>Which is what your most recent post says. Right?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>nope.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>Anyway, I think I have enough info to experiment with.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>
>
>

RJB
07-10-2005, 01:02 AM
Since you are a petulant little 'tard, let me explain my problem using small
words.

There are files I do not want to copy.

Which is a different problem from "files I don't want to have".

Your solution solves the latter. Not the former.

So your solution is not the best.








"guestfromhell" <guestfromhell.1q1jgr@no-mx.forums.iamnotageek.com> wrote in
message news:guestfromhell.1q1jgr@no-mx.forums.iamnotageek.com...
>
>>You know what? Everything new ruined something before. GUI's ruined
>>computing as a profession? Imagine how the abacus guys feel about
> you.
>>
>>I feel a little ownership to my problem here.
>>
>>So allow me to show you the door.
>>
>>Help me fix my simple /EXCLUDE problem or Go bother someone else.
>
>
> Well guess what - this is a public forum, you don't own squat.
>
> As for this guys copy problem, its easy, as I said. Copy the whole
> subdir somewhere else then delete the bits you dont want with a
> wildcard, then copy it to its final resting place. You can even write a
> 3 line batch file to do it if you like. Much easier than getting your
> neck round obscure parameters.
>
> Computing works best on Occams Razor - the simplest solution is always
> the best.
>
>
> --
> guestfromhell
> ------------------------------------------------------------------------
> guestfromhell's Profile:
> http://www.iamnotageek.com/member.php?userid=12490
> View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041
>

guestfromhell
07-10-2005, 01:04 AM
no, since your am idiot, let me explain it in even smaller words:

He wants to copy set of files A, of which he doest want subset B.

Your solution : Complex copy command that uses obscure switch , does
it in one command.

My solution: copy everything to a temp directory. Delete the ones you
dont want with a wildcard. Copy remaining wanted files to destination.
3 simple commands, no bolloxing about with obscure switches.

Its you thats the problem here,. your trying to come up with a
smartass ' ooo look at me i can write a one line program to do this',
when in fact it doesnt matter how many lines you do it in. Im a project
manager, dumb****, and the basic principle in project management is to
reduce a complex task down int osimple steps, its much easier, and less
likely to go wrong q.v the utter confusion your compelx smartass one
line command has caused this poor guy.

Your an elitist , arrogant smartass, and you wouldnt last 5 minutes in
IT support in the UK.


--
guestfromhell
------------------------------------------------------------------------
guestfromhell's Profile: http://www.iamnotageek.com/member.php?userid=12490
View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041

Kerry Brown
07-10-2005, 01:04 AM
"guestfromhell" <guestfromhell.1qa2ez@no-mx.forums.iamnotageek.com> wrote in
message news:guestfromhell.1qa2ez@no-mx.forums.iamnotageek.com...
>
> no, since your am idiot, let me explain it in even smaller words:
>
> He wants to copy set of files A, of which he doest want subset B.
>
> Your solution : Complex copy command that uses obscure switch , does
> it in one command.
>
> My solution: copy everything to a temp directory. Delete the ones you
> dont want with a wildcard. Copy remaining wanted files to destination.
> 3 simple commands, no bolloxing about with obscure switches.
>
> Its you thats the problem here,. your trying to come up with a
> smartass ' ooo look at me i can write a one line program to do this',
> when in fact it doesnt matter how many lines you do it in. Im a project
> manager, dumb****, and the basic principle in project management is to
> reduce a complex task down int osimple steps, its much easier, and less
> likely to go wrong q.v the utter confusion your compelx smartass one
> line command has caused this poor guy.
>
> Your an elitist , arrogant smartass, and you wouldnt last 5 minutes in
> IT support in the UK.
>
>
> --
> guestfromhell
> ------------------------------------------------------------------------
> guestfromhell's Profile:
> http://www.iamnotageek.com/member.php?userid=12490
> View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041
>

Both solutions work. Yours may fail because of insufficient disk space. The
other way may fail because the command is very complicated so it's hard to
make changes. In a real life situation a proper script would include all
sorts of error checking. The point of the thread was to learn something new
which is always a good thing. The only stupid question is the one that isn't
asked. It can be very frustrating for both sides trying to learn or explain
something via a newsgroup. No reason to get personal.

Kerry

guestfromhell
07-10-2005, 01:04 AM
I only retaliate when i am insulted, if you check you will find this
other guy resorted to calling me a 'retard', which was entirely
uncalled for. If you start it, you'll get back as good as you give.

Do you see me insulting anyone else on this forum who didnt get
offensive first?


--
guestfromhell
------------------------------------------------------------------------
guestfromhell's Profile: http://www.iamnotageek.com/member.php?userid=12490
View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041

Kerry Brown
07-10-2005, 01:04 AM
"guestfromhell" <guestfromhell.1qazr6@no-mx.forums.iamnotageek.com> wrote in
message news:guestfromhell.1qazr6@no-mx.forums.iamnotageek.com...
>
> I only retaliate when i am insulted, if you check you will find this
> other guy resorted to calling me a 'retard', which was entirely
> uncalled for. If you start it, you'll get back as good as you give.
>
> Do you see me insulting anyone else on this forum who didnt get
> offensive first?
>
>
> --
> guestfromhell
> ------------------------------------------------------------------------
> guestfromhell's Profile:
> http://www.iamnotageek.com/member.php?userid=12490
> View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041
>

You don't quote any of the original in your replies and the post you replied
to doesn't call you a retard so it's hard to tell. If the other person gets
personal first then I would probably flame them as well.

Kerry

guestfromhell
07-10-2005, 01:05 AM
AH, thats because I assume that A) if you reply to a post , you must
have read the whole thread, and b) most people are aware of the use of
the scroll bar on the side.

The trouble with quoting all the time is that the posts get longer and
loooonger and loooooooooonger and
looooooooooooooooooooooooooooooooooooooonger until the whole thing
becomes unreadable

so for those who missed it:

>Re: Sophisticated(!) copying in DOS
>
>--------------------------------------------------------------------------------
>
>Since you are a petulant little 'tard, let me explain my problem using
small
>words.
>

Now, If you scroll through this thread, you will see at no point before
that did i cast any aspersions or sharp words to this little bundle of
negativity and rage.

Therefore i claim innocence in this matter m'lud. The defence rests.

:-P


--
guestfromhell
------------------------------------------------------------------------
guestfromhell's Profile: http://www.iamnotageek.com/member.php?userid=12490
View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041

cquirke (MVP Windows shell/user)
07-10-2005, 01:06 AM
On Tue, 7 Jun 2005 16:35:23 -0700, "Kerry Brown"
>"guestfromhell" wrote

>> He wants to copy set of files A, of which he doest want subset B.

>> Your solution : Complex copy command that uses obscure switch , does
>> it in one command.

>> My solution: copy everything to a temp directory. Delete the ones you
>> dont want with a wildcard. Copy remaining wanted files to destination.
>> 3 simple commands, no bolloxing about with obscure switches.

The second solution scales poorly. The first solution is better,
assuming the logic is sound, and assuming no transcription errors take
place while copying and pasting into a .BAT or whatever.



>------------------------ ---- --- -- - - - -
Forget http://cquirke.blogspot.com and check out a
better one at http://topicdrift.blogspot.com instead!
>------------------------ ---- --- -- - - - -

guestfromhell
07-10-2005, 01:07 AM
> OK, I know you're trying to be helpful, but it's getting kind of
tough.

maybe cos the commands too advanced? Maybe doing in three commands is
easier to learn ? Something about walking beofre he can run? Mind you,
I used to train teenagers to use computers back in to 80's and i also
ran all sorts of user training course, so maybe I dont know anything
about teaching....................


--
guestfromhell
------------------------------------------------------------------------
guestfromhell's Profile: http://www.iamnotageek.com/member.php?userid=12490
View this thread: http://www.iamnotageek.com/showthread.php?t=1819075041


Sophisticated(!) copying in DOS