decompress string using 7-zip - 7zip

Is there a 7z command that decompress a string instead of a file?
I want to implement it in a c++ program so that it reads a file, edits it and try to decompress it
Thank you

I know its no direct solution but it could help, look at this: http://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/lzma920.tar.bz2/download

Related

How to convert vcf file to ped file using plink?

I am trying to convert a .vcf file to a .ped file using plink. I have read some manuals and posts online, but it seems that no one specifically mentions how to convert vcf to ped.
I am hoping that there may be some experts here who have experience with plink to convert vcf to ped. I would appreciate it if you could share the knowledge. Moreover, if there is another way (non-plink) of doing that, please do share it.
Thank you!
Plink provides its own functionality for converting vcf (and other format) files to plink-compatible ones. The command you're looking for is recode and the actual command would look like this:
plink --vcf myfile.vcf.gz --recode --out myfile
I convert my vcf files to PLINK formats (ped, fam, map) using VCFtools:
https://vcftools.github.io/man_latest.html
My commands look like this:
vcftools --vcf my_data.vcf --out my_data --plink

Tibco Zipping file

I have got a scenario in which I have got two files in a folder.One is .jpg format and other is .xmp format.I have to zip this folder.That means the final zip folder will contain both of these files.Is there is any way to zip them together in bw,without using java function.
Thanks in Advance.
You can use a Java code activity you won't have to add any libraries as the java natively can manipulate the Zip archives .. check this Appending files to a zip file with Java
You can invoke it as a system command like gzip mm/* in the External command activity
specify the script as the command to run in the External Command activity. The script runs the desired command and returns the process ID of the process it started. The return code of the script is stored in the return Code item of the External Command activity's output.
I hope this could help!

Batch command to unzip a file without any additional tool

Can any one help me out to find a batch command to unzip a file.
I do not want to use any external tool just want to unzip using .bat file.
Ths is not possible. the windows command line does not provide support for this.

Use system command to download XML file

I am writting expansion programs to a CAD program called 12d Model. The language I write these expansions in is simply called Macro language and it has a very limited API. So it doesn't have a way to find a file on Windows, list all files in a directory or download a file.
To overcome this I use simple ShellExecute and system calls. For example to list all files in a directory I use the system call "dir C:\ /B > C:\MyCurrentFolder\outfile.txt". One of my needs is to download and parse an XML file but the API has no download function.
Is there a system call to download a file from a URL? Is there some native way to do this? Maybe there is a Windows Application like regedit.exe or something that I can use to download a file?
If not, do you think it would be possible to do it through a batch script?
Windows does have built in FTP support using ftp.exe. So if you could find a FTP mirror of the file, or upload it to one yourself, that might work.
Yes there is a native way to do this. Use the msxsl.exe parser to download the xml file and save it to whatever location you would like. You can do this from the command prompt or from a batch file. Note the one caveat to this is you will need to use an xsl file that does not alter the xml file. The command would look something like this...
c:\msxsl.exe c:\myXML.xml c:\myXSLT.xsl > c:\myXML.xml
Note here the file located at c:\myXSLT.xsl cannot change the source file c:\myXML.xml

Compress command results in corrupted zip file

I have a script set up to rotate some log files in windows, and as part of the process I'd like it to automatically compress the rotated file. To do this I use the command
compress source.file destination.file.zip
However, if I try to open the file, I get the message "The Compressed (zipped) Folder is invalid or corrupted"
I've tried compress with -Z, and I get the same message. What am I doing wrong?
compress output is not ZIP file format compatible, it uses the LZW algorithm.
The only way to "open" a compressed file is with uncompress or gunzip.
Windows ports of common Unix commands, including compress and gzip/gunzip available here.
EDIT: To produce ZIP files from the command line in Windows, you can use something like 7-Zip, which includes a command line application (7z.exe). The Unix commands linked above also include zip.exe for manipulating ZIP files from the command line.

Resources