Page 3 of 3
Re: Extracting a zip file to its own folder
Posted: 05 Aug 2014 15:35
by CookieMonster
Sammay - I do get a text box which says
ks.dat<crlf>zipfile.zip, therefore everything works as it should

Re: Extracting a zip file to its own folder
Posted: 05 Aug 2014 15:37
by CookieMonster
Based on the only information you seem willing to provide:
Code: Select all
text zip_extract("C:\2\5.zip","D:\2","image1.png|image2.png");
That will attempt to extract
image1.png and
image2.png from the archive
C:\2\5.zip to the target path
D:\2. Assuming those files are within that archive this should create
D:\2\image1.png and
D:\2\image2.png. After which
zip_extract will return
D:\2 which is then displayed by the
text dialog.
Once again, you have explained exactly how and where I want the files in the zip to be placed.
I have successfully extracted the zip file using the XY default extract methods, there is nothing wrong with the zip file. Running the zip_extract() command does not extract the specific files I request out of the zip file.
Re: Extracting a zip file to its own folder
Posted: 05 Aug 2014 16:40
by bdeshi
CookieMonster wrote:Running the zip_extract() command does not extract the specific files I request out of the zip file
Come on, since the script I posted works all right, there's certainly something wrong about your usage of zip_extract().
Re: Extracting a zip file to its own folder
Posted: 05 Aug 2014 16:53
by TheQwerty
CookieMonster wrote:Running the zip_extract() command does not extract the specific files I request out of the zip file.
Running
zip_extract() cannot read your mind so it just extracts all items from "the selected archive into an auto-named folder in the current path."
Try passing the correct arguments to
zip_extract.
Re: Extracting a zip file to its own folder
Posted: 05 Aug 2014 21:09
by murdock01
I dont know if this will help because I did not read the whole post as I need to leave soon but ...
back in the day before XY had zip support I used this script
Code: Select all
run """<xydrive>\PApps\7-Zip\7z.exe"" x ""<curitem>"" -o*""", , ,0
This script runs the 7zip extractor in my portable apps directory. I triggered this with the following:
Code: Select all
"7Zip" 7z;zip;gzip;gz;tgz;tar;rar;cab;arj;rpm;deb;bz2>::load "<xydata>\scripts\7z.xys"
this is a custom file association.
So basically I download a zip file then double click it. The custom file association reads the extension, then executes the 7z.xys ) the first code block). The xys script runs 7zip which extracts the file into a new subfolder, in the same directory as the zip file, named the same as the zip file. Very quick and I have never had any issues.
This will only do one file at a time but it worked for me. You can modify it to accept more that one file and add more extensions to the association but here is what I have, Enjoy.
Re: Extracting a zip file to its own folder
Posted: 06 Aug 2014 02:25
by CookieMonster
Solved, it just worked !
Re: Extracting a zip file to its own folder
Posted: 06 Aug 2014 07:07
by autocart
So, what was the solution?