Change File Attributes in Batch and Rename the Files

File Attributes are metadata that define the nature and behavior of your files. Each electronic file, regardless of whether it is stored on a hard disk, DVD, USB flash drive or external hard disk, has metadata associated with it. File attributes can grant or deny access to the file. Your operating system and installed programs treat each file differently depending on the file attributes. File attributes help users hide, un-hide, archive, write-protect files or make them accessible again.

Rename Files in Bulk Using Easy File Renamer. Apply 10+ Renaming Rules. Also Rename files on Cloud. Download NOW!

Types of File Attributes

There are different types of file attributes:

Read-Only: This attribute locks your file for editing. A user can only read the contents of your file but not alter them. Making your files read-only will allow you to prevent accidentally modifying the contents of your files. However, using the read-only attribute, your files can still be edited by unauthorized people by simply removing the Read-only attribute.

Compressed: Sometimes, when you run out of disk space, Windows compresses the files on your drive to run smoothly. Such files are marked with the Compressed attribute. 

Encrypted: Windows has a file encryption feature to prevent unauthorized people from accessing your important data. You can encrypt your data in plain text to secure it from being stolen, data breach. A decryption key is required to decrypt the data to its original form. Windows changes the attribute of your encrypted files to Encrypted.

Hidden: The hidden attribute in Windows makes your file invisible while browsing your folders in File Explorer (earlier, Windows Explorer). Your computer is by default configured to not display the hidden files. However, your file can still be viewable after enabling the Show hidden files feature.

System Files: Your system by default marks the operating system files and components as System Files. You should never delete, move, rename or alter these files for your operating system to function correctly.

Changing File Attributes

A. Using the Properties Dialog

The easiest way to edit file/ folder attributes is to use the File/ Folder Properties dialog box.

  1. Just select the files/ folders to change their attribute.
  2. Right-click on your selection and choose Properties.
  3. In the General tab, mark the attributes of your choice and un-mark the ones you want to drop.
  4. Click on OK to save your changes.

B. Using Command Prompt

Similarly, you can also change the File/ Folder attributes using the Command Prompt. Here’s how:

Mark All Files in a Folder with the Read-Only Attribute

In this example, we’ll mark all the files in a folder with the Read-Only attribute. So the contents of the Read-only files can not be accidentally changed by a user or program.

Type Command Prompt in the Search Box on your Taskbar.

Right-click Command Prompt, and select Open.

Type the following command and press Enter:

Syntax:

attrib +r “<folder path>*.*”

Example:

attrib +r “C:\Users\Vikas\Downloads\Test Folder\*.*”

Note: You must enter the full path in double-quotations if there are spaces in your folder path.

Mark All Word Documents in a Folder with Read-Only Attribute

Similarly, if you need to mark only Word Documents (.docx) in a folder with the Read-Only attribute, you can follow the steps given below:

Open Command Prompt.

Type the following command and press Enter:

Syntax:

attrib +r “<folder path>*.<file extension>”

Example:

attrib +r “C:\Users\Vikas\Downloads\Test Folder\*.docx”

Remove the Hidden & System Attributes

In this method, we’ll use a single command to remove the Hidden and System attributes of files and folders. The command will turn these files and folders with normal attributes.

Type Command Prompt in the Search Box.

Right-click Command Prompt and select Run as Administrator.

Type the following command and press Enter:

Syntax:

attrib –h –s “<Full Path to your Folder>”

Example:

attrib –h –s “C:\Users\Vikas\Downloads\Test Folder\test file.docx”

Mark & Prepare Files for Archiving

Similarly, you can mark and prepare your files for archiving using the Command Prompt command given below:

Open Command Prompt.

Run the following command:

Syntax:

attrib +a “<Full Path to your Folder>”

Example:

attrib +a “C:\Users\Vikas\Downloads\Test Folder\test file.docx”

Hide an Entire Directory and All the Subfolders & Files

Let’s say for example, you’ve a folder named “Confidential Data ” in the D:\ drive on your hard disk. You need to hide this folder and all of its contents before you travel to your school or workplace. In such cases, you can run the command given below to entirely hide a directory and its contents:

Syntax:

attrib +h “<Your Directory>”

Example

attrib +h “D:\Confidential Data”

Note: You cannot use wildcards like *.txt in the above command. Windows will hide the entire directory and all the containing files and sub-folders.

Batch Rename your Files

There are different ways to rename hundreds of files on your hard disk at once. Here are some popular methods:

Method 1: Using Easy File Renamer (Recommended)

Using a third-party application Easy File Renamer is recommended. Easy File Renamer has a user-friendly interface and supports batch renaming files using different parameters. Unlike File Explorer, there is no need to rename files from one folder at a time. You can batch rename files from multiple folders at once with a few clicks.

  1. Download and install Easy File Renamer.
  2. Click on Add Files.
  3. Select the files you want to rename.
  4. You can add files from other folders by following the same Steps # 2-3 above.
  5. Select your desired renaming rule from the drop-down box on the left.
  6. Click on Add Rule.
  7. To add more rules, select another rule and click on Add Rule.
  8. Once you’ve finished, click on Rename to proceed.

Method 2: Using File Explorer in Windows

Unfortunately, Windows doesn’t include a tool to batch rename your files. While there are ways to rename multiple files at once using File Explorer, they have inherent limitations. For example, you can only replace the existing file names with new names. You cannot add text, remove text, swap characters.

  1. Click on the File Explorer icon on your Taskbar.
  2. Go to the folder containing your files.
  3. Select all the files using Ctrl + A.
  4. Right-click your selection and choose Rename. Or simply, press the F2 key of your keyboard.
  5. Type a new name for your files. For example: Pizza
  6. Press Enter.
  7. Your files will be automatically renamed in the following pattern: Pizza.jpg, Pizza – Copy(2).jpg, Pizza – Copy(3).jpg, Pizza – Copy(4).jpg, etc.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top