Please, help me understand

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Please, help me understand

Post by rinox »

Hi, I'm totally newbie with XYplorer....
I'm trying to make a button to compress/expand an archive file using 7zip.
I know that there are many example in the forum, but I want to understand (at least a bit) the script' s language.
I made button, Lclick expand the file Rclick compress.
Lclick code:

Code: Select all

run ""<xypath>\Data\Archiver\7z.exe" x -y -o<items>"
results: Error overflow
What I'm doing wrong?
Thanks in advantage and sorry for my poor english

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Please, help me understand

Post by highend »

Bad quoting and <items> exists only in a different context...

Try this:

Code: Select all

run """<xypath>\Data\Archiver\7z.exe"" x -y -o<selitems>";
One of my scripts helped you out? Please donate via Paypal

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

It doesn't work, no error but no results... I' ll try to download the latest 7zip version.

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Please, help me understand

Post by highend »

put a:

Code: Select all

step;
above that line (and indent the second line with e.g. 4 spaces!)

and show a screenshot of how that line is resolved by XY.
One of my scripts helped you out? Please donate via Paypal

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

No way :cry:

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Please, help me understand

Post by highend »

What is "no way"?...

Code: Select all

step;
    run """<xypath>\Data\Archiver\7z.exe"" x -y -o<selitems>";
Execute that and show a screenshot of the window that you'll get...
One of my scripts helped you out? Please donate via Paypal

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

Ok, I tried all you suggest. At this point the problem maybe about write permission on the folder (servers os are always critical about that), I'll investigate further, by now I can only say thank you very much and sorry for my poor english (I'm Italian)

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

but it MUST work... if I open a command, it work

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Please, help me understand

Post by highend »

Then please, post the screenshot^^
One of my scripts helped you out? Please donate via Paypal

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

Screenshot:
screen.jpg
It say "current command (interpreted and resolved)" but nothing??!!??
To see the attached files, you need to log into the forum.

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Please, help me understand

Post by highend »

You don't give 7z.exe an archive to extract^^ and atm you're trying to extract nothing to the name of the file^^

Explain exactly what you are trying to do. Give meaningful examples...

- Do you want to extract more than one file? If that's not the case you don't need <selitems> but <curitem>
- How exactly should the destination path look like?

E.g. this would extract all selected archives into folders that have the base names of their corresponding archive:

Code: Select all

run """<xypath>\Data\Archiver\7z.exe"" x <selitems> -y -o*";
One of my scripts helped you out? Please donate via Paypal

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

I wold like to expand selected (one or more) archive into relative named new folder in the same dir and open that dir/s in another tab/s

rinox
Posts: 15
Joined: 09 Jun 2013 15:37

Re: Please, help me understand

Post by rinox »

THANK YOUUUUU :P :P :P :P :P :P :P

highend
Posts: 14996
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Please, help me understand

Post by highend »

Code: Select all

    $folders = "";
    foreach($file, "<selitems |>") {
        run """<xypath>\Data\Archiver\7z.exe"" x ""$file"" -y -o*";
        $folders = $folders . "<curpath>\" . gpc($file, "base") . "|";
    }
    foreach($folder, $folders, , "e") { tab("new", $folder); }
One of my scripts helped you out? Please donate via Paypal

Post Reply