Zip the file and ask for password in a single shortcut key?
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Zip the file and ask for password in a single shortcut key?
Hi folks, how are you doing. ?
I need to make a repetitive task, that is, drag and drop a file into the WinRAR application and click Create Password, then type the password for that file. This is my repetitive task.
Is there a way to make a single shortcut key? When I press the shortcut key, it should zip and wait for me to enter my password. ?
Thank you, guys
I need to make a repetitive task, that is, drag and drop a file into the WinRAR application and click Create Password, then type the password for that file. This is my repetitive task.
Is there a way to make a single shortcut key? When I press the shortcut key, it should zip and wait for me to enter my password. ?
Thank you, guys
Re: Zip the file and ask for password in a single shortcut key?
Ofc this is not possible, XY doesn't support drag'n drop automation
You are free though to use
You are free though to use
input() and the winrar command line to do the same without a gui...One of my scripts helped you out? Please donate via Paypal
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
thank for your reply.
but i am not going to drag and drop on xyplorer.
currently i am working like Opened winrar application in my left side screen , and on my right side screen i keep my windows xplorer, i drag and drop a pdf file to winrar, the Winrar automatically pop up for zip and i click to set password. this is what i am doing now.
but i want to make this easy in my xyplorer, click on that folder or file, and press the short cut key to zip and ask for password for the zip file. is this possible to make it. thanks
but i am not going to drag and drop on xyplorer.
currently i am working like Opened winrar application in my left side screen , and on my right side screen i keep my windows xplorer, i drag and drop a pdf file to winrar, the Winrar automatically pop up for zip and i click to set password. this is what i am doing now.
but i want to make this easy in my xyplorer, click on that folder or file, and press the short cut key to zip and ask for password for the zip file. is this possible to make it. thanks
- Attachments
-
- 00001.png (135.44 KiB) Viewed 4539 times
Re: Zip the file and ask for password in a single shortcut key?
Read the second part of my first post again
One of my scripts helped you out? Please donate via Paypal
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
hi,
i dont understand this, i am not familiar with script or something. can you explain me please?
i dont understand this, i am not familiar with script or something. can you explain me please?
can you explain me please?You are free though to use input() and the winrar command line to do the same without a gui...
Re: Zip the file and ask for password in a single shortcut key?
Code: Select all
$dst = "E:\file done";
$rar = "C:\Program Files\WinRAR\WinRar.exe";
end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!";
end (!<curitem>), "No item selected, aborted!";
$drv = gettoken($dst, 1, ":") . ":\";
end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!";
if (exists($dst) != 2) { new($dst, "dir"); }
$base = gpc(<curitem>, "base");
$pass = input("Input encryption pw");
$opts = ($pass != "") ? "a -afzip -ep1 -p" . quote($pass) : "a -afzip -ep1";
run lax("$rar" $opts "$dst\$base" "<curitem>"), "%TEMP%";
One of my scripts helped you out? Please donate via Paypal
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
Thank for the Script, but this is not working as expected. when i run the script it is asking for the password, after entering the password
the file created in e drive, but its removed the original file extension, and not a zip file, please check and help..
the file created in e drive, but its removed the original file extension, and not a zip file, please check and help..
- Attachments
-
- FILE 1.png (183.55 KiB) Viewed 4511 times
Re: Zip the file and ask for password in a single shortcut key?
Code: Select all
run lax("$rar" $opts "$dst\$base.zip" "<curitem>"), "%TEMP%";One of my scripts helped you out? Please donate via Paypal
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
hi, bro thank you very much, its working as a charm.
sorry for the delayed reply. i got outside of our office.
Thank you
sorry for the delayed reply. i got outside of our office.
Thank you
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
Hi brother, how to make this script to set a default single password and zip the file automatically?
Thank you
$dst = "E:\file done";
$rar = "C:\Program Files\WinRAR\WinRar.exe";
end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!";
end (!<curitem>), "No item selected, aborted!";
$drv = gettoken($dst, 1, ":") . ":\";
end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!";
if (exists($dst) != 2) { new($dst, "dir"); }
$base = gpc(<curitem>, "base");
$pass = input("Input encryption pw");
$opts = ($pass != "") ? "a -afzip -ep1 -p" . quote($pass) : "a -afzip -ep1";
run lax("$rar" $opts "$dst\$base.zip" "<curitem>"), "%TEMP%";
Thank you
$dst = "E:\file done";
$rar = "C:\Program Files\WinRAR\WinRar.exe";
end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!";
end (!<curitem>), "No item selected, aborted!";
$drv = gettoken($dst, 1, ":") . ":\";
end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!";
if (exists($dst) != 2) { new($dst, "dir"); }
$base = gpc(<curitem>, "base");
$pass = input("Input encryption pw");
$opts = ($pass != "") ? "a -afzip -ep1 -p" . quote($pass) : "a -afzip -ep1";
run lax("$rar" $opts "$dst\$base.zip" "<curitem>"), "%TEMP%";
Re: Zip the file and ask for password in a single shortcut key?
Code: Select all
$pass = "PASSWORD";
$dst = "E:\file done";
$rar = "C:\Program Files\WinRAR\WinRAR.exe";
end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!";
end (!<curitem>), "No item selected, aborted!";
$drv = gpc($dst, "drive") . ":\";
end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!";
if (exists($dst) != 2) { new($dst, "dir"); }
run lax("$rar" a -afzip -ep1 -p"$pass" "$dst\<curbase>.zip" "<curitem>"), "%TEMP%";
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
Thank you Jupe. it works well
Thanks for the community.
Thanks for the community.
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
@jupejupe wrote: ↑02 Jan 2025 05:13Code: Select all
$pass = "PASSWORD"; $dst = "E:\file done"; $rar = "C:\Program Files\WinRAR\WinRAR.exe"; end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!"; end (!<curitem>), "No item selected, aborted!"; $drv = gpc($dst, "drive") . ":\"; end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!"; if (exists($dst) != 2) { new($dst, "dir"); } run lax("$rar" a -afzip -ep1 -p"$pass" "$dst\<curbase>.zip" "<curitem>"), "%TEMP%";
@highend
hi, how to add many files at once and run this script to zip and passoword the files seperately at once. Thank you
Re: Zip the file and ask for password in a single shortcut key?
By looping over them?
Code: Select all
$pass = "PASSWORD";
$dst = "E:\file done";
$rar = "C:\Program Files\WinRAR\WinRAR.exe";
end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!";
$items = <get SelectedItemsPathNames>;
end (!$items), "No item(s) selected, aborted!";
$drv = gpc($dst, "drive") . ":\";
end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!";
if (exists($dst) != 2) { new($dst, "dir"); }
foreach($item, $items, <crlf>, "e") {
$base = gpc($item, "base");
run lax("$rar" a -afzip -ep1 -p"$pass" "$dst\$base.zip" "$item"), "%TEMP%";
}
One of my scripts helped you out? Please donate via Paypal
-
shamsudeen
- Posts: 64
- Joined: 05 May 2012 06:58
Re: Zip the file and ask for password in a single shortcut key?
Thank youhighend wrote: ↑13 Aug 2025 12:57 By looping over them?
Code: Select all
$pass = "PASSWORD"; $dst = "E:\file done"; $rar = "C:\Program Files\WinRAR\WinRAR.exe"; end (exists($rar) != 1), quote($rar) . <crlf 2> . "does not exist, aborted!"; $items = <get SelectedItemsPathNames>; end (!$items), "No item(s) selected, aborted!"; $drv = gpc($dst, "drive") . ":\"; end (exists($drv) != 2), "Drive " . quote($drv) . <crlf 2> . "does not exist, aborted!"; if (exists($dst) != 2) { new($dst, "dir"); } foreach($item, $items, <crlf>, "e") { $base = gpc($item, "base"); run lax("$rar" a -afzip -ep1 -p"$pass" "$dst\$base.zip" "$item"), "%TEMP%"; }
XYplorer Beta Club