Am I able to autodelete / password protect files when closing folder

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tweacle
Posts: 71
Joined: 11 Apr 2018 05:38

Am I able to autodelete / password protect files when closing folder

#1 Post by tweacle » 09 May 2018 11:26

Hi

I don't even know if this can be done but what im trying to do is when someone opens a password protected 7zip folder it unzips it to the specific location I want it to by using a SFX archive and the person puts the password in to view.

What I need to do then is the 7zip folder once unzipped needs deleting and when the person closes the unzipped folder after opening I need it to go back into password protect and so when they try to reopen they have to put password in again.

Any ideas?

Thanks

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Am I able to autodelete / password protect files when closing folder

#2 Post by penpen » 16 May 2018 04:18

Batch can't detect windows events such as closing a folder, so this is not possible.

You could just doubleclick the sfx-zip file to extract its data and use one of the batch scripts we gave you to create the sfx-zip files;
For that you have to add the "-sfx" switch and use ".exe" as the archive file extension; this example may help you:
https://superuser.com/questions/160672/ ... ng-archive.

penpen

Post Reply