How to create a zip file by a key press?
Posted: 02 Jun 2009 14:29
I want to press press Alt+F5 to compress selection to a zip file.
Case 1
If the selected item is a single folder or file, then the zip file should get the same name as the folder or file.
I am trying the following:
With the above, when I press Alt+F5 with a folder named 'test' selected (whose path is 'C:\sridhar\websites\test'), XYP is generating the 'test.zip' file. But when this zip file is opened, it contains a folder named 'sridhar' and inside that another folder named 'websites' and inside that finally the desired one 'test'.
What is the correct script to stop the zip file from being created with the folder structure?
Case 2
If multiple items are selected (i.e., multiple folders or multiple files or files+folders) the resulting zip file should get the name of the parent folder.
Can anyone give me the script for this?
Thanks in advance.
Case 1
If the selected item is a single folder or file, then the zip file should get the same name as the folder or file.
I am trying the following:
Code: Select all
"WinRAR" a "<curbase>" <items>What is the correct script to stop the zip file from being created with the folder structure?
Case 2
If multiple items are selected (i.e., multiple folders or multiple files or files+folders) the resulting zip file should get the name of the parent folder.
Can anyone give me the script for this?
Thanks in advance.