Custom button concatenate commands and menu

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

Custom button concatenate commands and menu

Post by rinox »

Hi, I've have a dopdown menu with this code:

Code: Select all

$items = getinfo("SelectedItemsPathNames","<crlf>");
     writefile("<xypath>\Data\Archiver\listfile.7ztd", $items);

"Espandi" run """<xypath>\Data\Archiver\7z.exe"" x <selitems> -y -o*";
-
"Crea zip" run """<xypath>\Data\Archiver\7za.exe"" a -tzip -mx9 test.zip @<xypath>\Data\Archiver\listfile.7ztd";
"Crea 7zip + veloce" run """<xypath>\Data\Archiver\7za.exe"" a -t7z -mx3 test7zmx3.7z @<xypath>\Data\Archiver\listfile.7ztd";
"Crea 7zip + piccolo" run """<xypath>\Data\Archiver\7za.exe"" a -t7z -mx9 test7zmx9.7z @<xypath>\Data\Archiver\listfile.7ztd";
I would like to do all automatically without first make the file list, EX:

Code: Select all

"Create zip"  $items = getinfo("SelectedItemsPathNames","<crlf>"); &&  writefile("<xypath>\Data\Archiver\listfile.7ztd", $items) && run """<xypath>\Data\Archiver\7za.exe"" a -tzip -mx9 test.zip @<xypath>\Data\Archiver\listfile.7ztd";
Of course the code is not working... please help me to find the right way, thank you all

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

Re: Custom button concatenate commands and menu

Post by highend »

Sorry, I don't understand...

You want to create an archive from a list of files by giving 7z a filename (which is the list file and contains all files), without creating that listfile first???
One of my scripts helped you out? Please donate via Paypal

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

Re: Custom button concatenate commands and menu

Post by rinox »

Sorry for the previous post (going crazy maybe), I finally done what I looked for:

Code: Select all

"Crea zip" $items = getinfo("SelectedItemsPathNames","<crlf>");
     writefile("<xypath>\Data\Archiver\listfile.7ztd", $items);
     run """<xypath>\Data\Archiver\7za.exe"" a -tzip -mx9 test.zip @<xypath>\Data\Archiver\listfile.7ztd";
-
"Espandi archivi selezionati" $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); }
Now I'm trying to delete the "listfile.7ztd" once files are archived (ahk cmd ex: runwait) but really I don't know if needed... I think writefile() overwrite existent file...... or not?
Anyway there's a way to run an executable hidden or minimized (7z cmd)?

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

Re: Custom button concatenate commands and menu

Post by highend »

I'm trying to delete the "listfile.7ztd" once files are archived

Code: Select all

run """<xypath>\Data\Archiver\7za.exe"" a -tzip -mx9 test.zip @<xypath>\Data\Archiver\listfile.7ztd", <curpath>, 1;
I think writefile() overwrite existent file...... or not?
It does by default
Anyway there's a way to run an executable hidden or minimized (7z cmd)?
Hidden: runret()

Alternative:
run command, [directory], [wait=0], [show=1]

Try 0 or 2 for the show value
One of my scripts helped you out? Please donate via Paypal

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

Re: Custom button concatenate commands and menu

Post by rinox »

As expert audiophile I can say you are "Esoteric" (much more the highend) :appl:

Post Reply