1 vote
Copy-ToZip does not work with files starting with [

Description

 
These file are especially common when working with ooxml (for example in pptx files)


PS C:\temp> "this is a test" > '.\`[test`].txt'
PS C:\temp> import-module filesystem
PS C:\temp> new-zip test.zip
PS C:\temp> ls '.\`[test`].txt' | Copy-ToZip -ZipFile .\test.zip
PS C:\temp> ls *test*txt


Directory: Microsoft.PowerShell.Core\FileSystem::C:\temp


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 7/5/2012 11:20 PM 34 [test].txt
PS C:\temp> ls *test*txt | Copy-ToZip -ZipFile test.zip
PS C:\temp> Read-Archive .\test.zip
PS C:\temp>

also ii test.zip shows no files added

File Attachments


No files are attached


Comments

most recent at top (show oldest at top)


Updating...
Page view tracker