XCOPY exclude -- .CS, but not .CSS

M

matt

hello,

i am using the XCOPY command as part of a deployment script. part of
this script is to screen out .CS files (c# source code). i can do this
by this to my excludes.txt file:

.cs

....however, that also seems to exclude .CSS files (stylesheets), which
i do not want to do.

any suggestions on the syntax to achieve this?


thanks!
matt
 
M

Mark V

In said:
hello,

i am using the XCOPY command as part of a deployment script.
part of this script is to screen out .CS files (c# source code).
i can do this by this to my excludes.txt file:

.cs

...however, that also seems to exclude .CSS files (stylesheets),
which i do not want to do.

any suggestions on the syntax to achieve this?

What OS?

The problem is most likely "Win95TruncatedExtensions"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Win31FileSystem REG_DWORD 0x0
Win95TruncatedExtensions REG_DWORD 0x0

W2K defaulted to On (1)
http://support.microsoft.com/kb/164351/en-us
 
C

Clay Calvert

What OS?

The problem is most likely "Win95TruncatedExtensions"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Win31FileSystem REG_DWORD 0x0
Win95TruncatedExtensions REG_DWORD 0x0

Hmmm. Doesn't that setting only apply to extensions with more than 3
characters?
Clay Calvert
(e-mail address removed)
Replace "Z" with "L"
 
M

Mark V

[ ]
Hmmm. Doesn't that setting only apply to extensions with more
than 3 characters?

That is what the documentation says... It has been so long (I
started turning Off this horrid default with NT4 at OS
installation) that I cannot be certain now. If the
Win95TruncatedExtensions is On on the OP's system, likely it is not
wanted. If turning it off does resolve it, so much the better.
Something to try...

Otherwise OP, show us some commands and please check the short
filenames there for collisions perhaps? Ensure the excludes file
has no unexpected characters or whitespace within. That's all I
can think of immediately.
 
D

David Smith

hello,

i am using the XCOPY command as part of a deployment script. part of
this script is to screen out .CS files (c# source code). i can do this
by this to my excludes.txt file:

.cs

...however, that also seems to exclude .CSS files (stylesheets), which
i do not want to do.

any suggestions on the syntax to achieve this?


thanks!
matt

I don't know how to do this with XCOPY, but if you have access to the
"Windows Resource Kit Tools",
check out ROBOCOPY.EXE. The switch to use is probably /XF *.cs
 
G

Guy

matt said:
i am using the XCOPY command as part of a deployment script. part
of this script is to screen out .CS files (c# source code). i can
do this by this to my excludes.txt file:

.cs

...however, that also seems to exclude .CSS files (stylesheets),
which i do not want to do.

any suggestions on the syntax to achieve this?

Rename the *.cs files to some other extension which you put in the
command /exclude:excludes.txt then rename them back.

If syntax in /exclude:file matches ANY part of source path it will be
excluded.

Or move... or some other option.
 
M

matt

Mark said:

sorry, i had cross-posted to to win2000.cmdprompt group as well as
yours; that is indeed my OS.

i dont think its the win95 thing; i think its XCOPY's exclude behavior
-- if any part of the exclusion item matches, it excludes it. sorta
dumb. much better to have required wildcard use for that behavior.

ill look into some of the suggestions, thanks.


matt
 
M

Mark V

In said:
sorry, i had cross-posted to to win2000.cmdprompt group as well
as yours; that is indeed my OS.

Responded in alt.msdos.batch.nt _only_.
Hint: Use cross-posting and set a single follow-up group where
feasible/needed.
 
P

Paul R. Sadowski [MVP]

Hello, (e-mail address removed)!
You wrote on 31 Jul 2006 15:21:27 -0700:

m> hello,

m> i am using the XCOPY command as part of a deployment script. part of
m> this script is to screen out .CS files (c# source code). i can do
m> this by this to my excludes.txt file:

m> .cs

..cs\
Works as expected for me on XP excluding .cs but not .css. Don't have access
to a 2K machine right now.

08/02/2006 03:46 PM <DIR> .
08/02/2006 03:46 PM <DIR> ..
08/02/2006 03:46 PM 0 1.cs
08/02/2006 03:46 PM 0 1.css
08/02/2006 03:50 PM 4 ex.txt
3 File(s) 4 bytes

Total Files Listed:
3 File(s) 4 bytes
2 Dir(s) 5,964,414,976 bytes free

C:\users\Sadowski\ttttt [(firecat) 15:51, Wed 08/02/2006] xcopy /p
/exclude:ex.txt *.* i:\
C:1.css (Y/N)? n
C:ex.txt (Y/N)? n
0 File(s) copied

m> ...however, that also seems to exclude .CSS files (stylesheets),
m> which i do not want to do.

m> any suggestions on the syntax to achieve this?


m> thanks!
m> matt

With best regards, Paul R. Sadowski [MVP]. E-mail: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top