Renaming Multiple Rar Files

Posted By admin On 24/07/21
HomeYodot RAR RepairRepair RAR Error Filename Too Long

I have a lot of comics, each one on rar files. I wanna convert these rar files to cbr files. I know how to convert one rar file (simple changing to cbr on the file properties), but this way I need a lot of work to convert the entire library. Example: batman1.rar, batman2.rar. Batman60.rar I wanna convert to batman1.cbr, batman2.cbr. Renaming a file on Windows 10 is simple. You just right-click and select Rename.But doing this for a few dozen or a few hundred files gets tedious. Thankfully, it's easy to batch rename files in Windows 10 using File Explorer, PowerShell, or the Command Prompt.

“Hi guys, I have some RAR files on my computer that I can’t open anymore. When I try to extract files from them, the WinRAR application suddenly stops and encounters an error message something like “filename is too long”. I was unable to delete the folder until I shortened the directory name. Extracting worked only with a short filename. Does this happen to anyone? I will be very thankful if someone help me to fix this RAR file issue.”

Renaming Multiple Files In File Explorer

One intrinsic weakness in WinRAR application is it cannot handle too long filenames and directory structures. Attempting to extract too long filenames from RAR achieve results in error. Unfortunately, there is no automated way to resolve long filename; but there are ways which work around this limitations, one such thing is changing the extraction location and then change the file name.

Steps to change extraction location:

Step1: Open your RAR file in WinRAR. The easiest way to open the file in WinRAR is by double clicking the RAR file in the Windows Explorer.

Step2: Click the “Extract To” button.

Step3: Click the root folder of any drive, such as “(C:)” and “OK”. This extracts the contents to root folder, which minimizes the path name without changing the contents of the RAR file.

Steps to change file names:

Step1: Open the RAR file in WinRAR application.

Step2: Right-click any file or folder name and select “Rename” option.

Renaming Multiple Rar Files

Step3: Type a shorter name and press “Enter”. Initially choose higher level folders to rename before renaming its subfolders and files. Doing this so, potentially renames multiple file paths simultaneously in a single action.

Step4: Click “Extract To”, choose the root directory of any drive and click “OK” to extract files and folders.

Even after doing this, if you’re not able to open RAR file with long filenames, then you must use any RAR repair application to fix this issue. Yodot RAR Repair is efficient tool in fixing various types of errors associated with RAR files and hence it is used by many users for repairing their RAR files on Windows computer.

Software to repair RAR filename error:

Many users encounter several errors while using RAR file on their system such as filename is too long, file is write protected, file is corrupted and many other error messages. Yodot RAR Repair is a wonderful RAR repair utility that helps you to repair all these errors with easy and simple procedure. This application is an advanced built-in repair utility to repair RAR files that are corrupted due to virus infection, CRC errors, download errors, unknown compression techniques by the third party tool, power failure etc. This application not only repairs RAR file, but it also recovers inaccessible files and folders from inaccessible RAR achieve effectively. This program is a read-only tool that doesn’t modify the original contents of the RAR file during repair process.

Steps to solve RAR filename error:

  • Download and install Yodot RAR Repair in your Windows desktop/laptop
  • Run the application by clicking on the shortcut icon created on desktop and follow instruction given on screen
  • Click on “Browse” button to select the RAR file to fix error filename too long
  • Start the repair process by pressing “Repair“ option
  • You can view the RAR repair process on progress bar in next tab
  • Once repair process gets finished, the software will display repaired RAR file
  • Click on the “Next” button and finally save repaired RAR file to your preferred location using “Save” option

Precautions:

  • Conversions of RAR files should be properly done otherwise the file header would get corrupted and make the entire file inaccessible
  • Regularly update your RAR application in order to fix bugs in the application
  • Install reputed anti-virus application to protect RAR files from virus or malware attack

This guide describes the use of the WinRAR command-line tools (v5.01) for compressing and uncompressing files in a directory and their use in batch files (for IZArc and 7-zip, see this post). This guide is an extension of a previous post, Automate Zipping Tasks using the Command-line Interface that explained the use of the command-line tools for two free compression utilities, IZArc and 7-Zip. The information in this guide was tested on a Windows PC running Vista.

How to batch rename files

WinRAR is a popular and powerful archive manager that can be used from the command-line or with scripting languages such as batch files. It includes two command-line tools, rar.exe and unrar.exe, where rar.exe compresses and unrar.exe uncompresses files. Both are located in the “C:Program FilesWinRAR” folder in the installable version. Although WinRAR is shareware, it can be used on a trial basis for 40 days. Using WinRAR’s command-line tools is similar to those for IZArc and 7-Zip. The syntax for using the WinRAR executables is:

To get a listing of the options for the rar and unrar commands, open a command window, cd to the WinRAR directory, and type rar or unrar and then press enter (rar /? or rar help may also be used, use rar >rar_cmds.txt or unrar >unrar_cmds.txt to print the command options to a file). For more detailed information, open the rar.txt file in the WinRAR directory which contains the RAR console version user’s manual.

Examples to compress a folder:

creates archive yourfiles.rar and compresses all .txt files in the current folder

creates archive yourfiles.rar in C:yourfolder and compresses all .txt files in the current folder and its subfolders

creates archive yourfiles.rar in C:yourfolder and compresses all .txt files in otherfolder and its subfolders

creates archive yourfiles.rar and compresses all files in the current folder, but doesn’t include subfolders (note lack of extension; WinRAR will use the default extension .rar)

“a” command. Adds to the archive

“-r” switch. Recurses subfolders

Renaming Multiple Rar Files

Examples to uncompress a folder:

Rename

extracts all *.gif files from yourfile.rar to c:extractfolder (trailing backslash required) and restores the folder structure

extracts all files in c:yourfile.rar to the current folder (folder structure ignored)

“x” command. Extracts with full paths

“e” command. Extracts and ignores paths

Compression example using Multiple Switches:

compresses all new or updated files from c:test and its subfolders to e_archive.rar, deletes the files after they are added to the archive, and excludes any files with a “bat” extension,

“a” command adds to the archive

“-r” switch. Recurses subfolders

“-ep” switch. Adds files to the archive without including the path information. Multiple can exist in the archive with the same name.

“-u” switch. Equivalent to the “u” command when combined with the “a” command. Adds new files and updates older versions of the files already in the archive

“-df” switch. Deletes files after they are moved to the archive

“-x” switch. Excludes the specified file(s) from the operation

Basic rules for WinRAR:

  • When files or listfiles are not specified, all files in the current folder are processed
  • When specifying all files in a folder, yourfolder or yourfolder*.* are equivalent
  • Folder structures are automatically saved in archives (but not automatically extracted)
  • WinRAR uses the .rar extension by default, but that can be overridden by specifying the zip extension in the archive name
  • Switches and commands are not case sensitive and can be written in either upper or lower case

Another point is that WinRAR doesn’t appear to install to the Windows path environment variable, so it must be specified either at a command prompt, set permanently in the environment variable settings, or specified in a batch file (WinRAR v3.71.0.0 was used for this guide and that may not be the case for all versions).

To set the Windows path environment variable temporarily at a command prompt or in a batch file, use the following command:

To set it permanently in the Windows path for your PC:

start–>Control Panel–>System–>Advanced system settings–>Advanced Tab–>Environment Variables–>System Variables–>Path–>Edit. Add the path ;C:Program FilesWinRAR; to the end (don’t forget the single semicolons at the beginning and end). Hit OK three times.

Using WinRAR in Batch Files:

Two batch file examples are provided below, The uncompress_rar.bat file decompresses all .rar files from a folder and places the extracted files into another directory.

File

The compress_rar_rev2.bat file provides the following compression options for a user specified directory. Option 4 is the most commonly used structure and the most appropriate option in most cases:

Virtual

  1. Compress files in dir individually (no subdirs)
  2. Compress files in dir and subdirs individually – no paths
  3. Compress all files in dir into a single archive (no subdirs)
  4. Compress all files in dir and subdirs into a single archive
  5. Compress all files in dir and subdirs into a single archive – no paths

Be sure to change the extension(s) to .bat before using either file and edit the folder paths as required. Both of the following batch files temporarily set the Windows path environment variable for the WinRAR application folder when executed.

Rar

Batch file downloads:

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.