How to prevent files in a compressed package from being deleted? Teach you 3 methods!

WBOY
Release: 2024-07-18 07:47:36
Original
599 people have browsed it

Protecting archive files from deletion is a critical step in maintaining their integrity and security. In order to help you understand how to use WinRAR to effectively prevent file deletion, PHP editor Baicao has specially compiled the following summary. Read on to learn how WinRAR provides you with the tools and techniques you need to protect archive files.

The following are 3 methods to prevent files in compressed packages from being deleted. Let’s take a look!

Method 1: Set the read-only attribute of the compressed package

Set the compressed file to the read-only attribute to prevent the file from being modified or deleted.

1. Select the compressed package that needs to be protected, right-click the mouse and select [Properties].

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

2. In the properties window, select the [Read-only] option, and then click [OK] to complete the setting.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

3. After the compressed package is set with the read-only attribute, when you want to delete the files in the compressed package, a dialog box will pop up, prompting that the file is a read-only file and cannot be deleted.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

Method 2: Set locked files

After locking the compressed package through the lock function of WinRAR, you will not be able to add, delete or modify files in the compressed package at will.

1. Open the compressed package that needs to be locked through WinRAR, and then click [Lock Compressed File] in the [Command] list of the menu tab.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

2. A dialog box will then pop up, and you can see that the [Prohibit modification of compressed files] option has been checked. After clicking [OK], the compressed package will be locked.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

3. After the setting is completed, you can see that [Add] and [Delete] in the menu tab are gray and cannot be clicked, which means that files in the compressed package cannot be added or deleted.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

Method 3: Set password protection

By setting a password for the compressed package, unauthorized users cannot perform any operations on the file, including deletion. But this method is only suitable for RAR format compressed files.

1. Select the file or folder to be compressed, right-click the mouse and select [Add to compressed file...].

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

2. In the pop-up [Compressed File Name and Parameters] window, select [RAR] format, and then click the [Set Password...] button.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

3. Enter the password in the pop-up window and make sure the [Encrypt file name] option is selected, then click [OK] to complete the setting.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

4. After the settings are completed, double-click to open the compressed package, and a dialog box will pop up immediately prompting you to enter a password. Instead of opening the compressed package to see what is inside, the files in the compressed package cannot be deleted.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

If password protection is no longer required, since WinRAR does not have a "cancel password" option, you can only decompress the compressed package through the password and then recompress it into a compressed package without "encrypted file name".

So when setting the password, remember to remember it or save it. If you accidentally forget the password, you will not be able to open the compressed package or decompress the compressed package.

Then what if you really can’t remember? In this case, we can try to use the help of other tools.

For example, Pepsi Niu RAR Password Recovery Tool, the tool provides 4 retrieval methods, which can help us retrieve the password of the RAR archive.

After importing the password-set RAR archive into the tool, select the appropriate method and follow the prompts.

How to prevent files in a compressed package from being deleted? Teach you 3 methods!

Through the above 3 methods, you can effectively prevent files in the compressed package from being deleted and ensure the security and integrity of the files. I hope to be helpful!

The above is the detailed content of How to prevent files in a compressed package from being deleted? Teach you 3 methods!. For more information, please follow other related articles on the PHP Chinese website!

source:passneo.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!