Yes, I though about that, but it seems a large step backwards. I thought
Powershell was the future.
The biggest problem I have with xcopy is the reliance on a file on the hard
drive listing all of the exclude items. If I could pass in the exclusion list
via memory, it would be acceptable. The file slows things down a little, and
is a risk if that file is not there at runtime.
Thanks
David
"Marco Shaw [MVP]" wrote:
> bep@xxxxxx wrote:
> > Hello
> >
> > It seems that Powershell 1.0 was shipped without a working -exclude
> > parameter on any of the file IO functions (Get-childitem, Remove-Item,
> > Move-Item, Copy-Item, etc.
> >
> > Has anyone made or found replacement cmdlets that do have working -exclude
> > parameters?
> >
> > This is a really strange thing. I think Powershell is one of the best things
> > to come out of MS in the recent years, and have been using it since the first
> > Beta. But I have not needed the esclude until now, and it surprises me that
> > such fundamental functionality does not work. It further surprises me that
> > the parameter was left in, and the help just says it does not work. Wy not
> > ship without the parameter?
> >
> > My situation is that I need to copy from a source path to a destunation
> > path, recursively, with a bunch of files and folder names excluded from the
> > copy. Examples of the exclude list are ("*.cs", "*.sln","*.suo", "*.csproj",
> > "*.csproj.*", "\obj")
> >
> > Thanks
> > David >
> Yes, I'm sure it can be done, especially if you need to create
> directories at the destination, but it may be easier for you to use
> something like xcopy from DOS.
>
> Marco
>
> --
> Microsoft MVP - Windows PowerShell
> http://www.microsoft.com/mvp
>
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com
>