How to zip files with japanese names in csharp? - sharpziplib

I am using "ICSharpCode.SharpZipLib.Zip" namespace to zip the files. I want to zip some files with japanese names. When i zip using ZipOutputStream i am getting junk filenames. Can anyone help on this?

Related

How to ZIP a whole folder( including Subfolders and files) using 7zip in PowerShell

I am trying to ZIP a whole folder( including Subfolders and files) using 7zip in PowerShell
Below is the code:-
& "$env:C:\Program Files\7-Zip\7zFM.exe" -mx=9 a "C:\Users\Rajat.Choudhary\Desktop\rajat\*" "C:\Users\Rajat.Choudhary\Desktop\backup.zip"
Every time the 7 Zip application opened when I executed this code in VS code editor.
Please suggest the solution for this.

Attribute "A" missing in the zipped file through powershell "Compress-Archive"

Compressed a file through powershell Compress-Archive feature.
On opening the archive in the 7-zip there is no 'A' in the attribute column, i believe 'A' stands for archive.
When file compressed through windows feature (send to -> Compressed (zipped) folder) "A" attribute is present(When opened archive in 7-zip).
How can I get the 'A' attribute when zipped through Compress-Archive?
Real problem:
I am trying to unzip the file through puppet.
unzip working on files zipped through windows feature
unzip not working on Compress-Archive feature (only through puppet, normal unzip command is working)
On opening both the zipped files (through Compress-Archive, windows feature) in 7-zip archive I observed that attribute 'A' is missing in the zipped (Compress-Archive) file.
Please help.
Tagged puppet as well, could be a known scenario.

A script to archive all files last modified dated a specific month-year

I need to create a script (or command line) that will utilise 7-zip and archive all files dated a specific month-date. e.g. compress and archive all files in a specified directory that are date modified xx-may-2018 and create the archive in another specified directory.
There are plenty of scripts around for archiving but none that allow you to specify month-year.
Any help much appreciated.

How to move a file in to zip uncompressed, with zip cmd tool

I'm try to determine how to use the zip cmd line tool to move a file (uncompressed) in to a zip of compressed files (ie I want a zip in the end with all files but one compressed, b/c the one file is another compressed file).
Anyone know how to do this?
It looks like you could use -n option to just store the files with defined extensions together with -g option to append the file to archive.
I didn't test it, but something like this should do the trick:
zip -gn .foo archive.zip myAddedFile.foo
Although documentation states that, by default, zip does not compress files with extensions in the list .Z:.zip:.zoo:.arc:.lzh:.arj, so if you are adding a file with one of those extensions you should be fine.
Documentation to the command is here
-m is what I wanted, moves the file(s) into a zip.

Using wildcards for filenames in powershell

I am having a lot of issues trying to automate downloading from an ftp site. I know the folder the file will be in, and I know that it will be a .zip file. However I do not know what the files will be named.
So I have code that works if I know the file name...for example:
$sourceuri = "ftp://myFtpSite/test/myZipFile.zip"
I would like to be able to use wildcards in this string so it will recongize any zip file. So I could write something like
$sourceuri = "ftp://myFtpSite/test/_.zip"
and it would download any zip file in that folder.
I know this question is ancient, but have you considered just using the console app ftp.exe? You can build a text file with commands (such as "mget *.zip" to retrieve all .zip files) and automate the process.
ftp -s:filename