I have filename.zip file and if double click the file it has to extract the file in the desired location("c:\\user\\username"). I have tried using the batch file but didnt give me the required result.
@echo on
@set nested=%nested%Z
set _dest=c:\user\username
if NOT EXIST %_dest% md %_dest%
So if i double click on zip file it has to execute batch file to place file in the destination folder path.How can i do that?
If I understand correctly, you simply want to extract a .zip
archive to a previously defined directory c:\\user\\username
, when the user clicks that .zip
archive.
No, this is not possible.
A .zip
file has no default extraction destination. Nor has is a way to execute scripts upon extraction. It is just a container for compressed data. When you click it, your OS runs a program configured to handle .zip
files, allowing you to view the contents, extract the contents, etc - but what and how exactly, is up to the user that clicked the file.
What you effectively want to have is an installer . Here are some pointers for options to do that:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.