Rename Files Remove Spaces

Spaces in file names can be a big hassle to fix especially if the file has to be either forwarded to someone or is to be posted on the Internet.

Renaming files and removing spaces from filenames is very critical for every user so that they can give a more meaningful name to their files and this helps in more and more ways than we could ever imagine.

Sifting through a trove of files and removing spaces manually is just not a productive way to get things done. To make it easier for you, we’ve got a couple of methods that promise results with a high degree of accuracy coupled with swiftness in the execution of the operation to remove spaces in filenames.

You can do this manually (achievable but a very dry and frustrating job), use a script to do it (doable but simply not everyone’s cup of tea) or finally use a software program (the best bet for most users out there). Simply download and install Easy File Renamer, load up the target data and apply the relevant rule. Click Rename, the job gets done! It’s as simple as that!

Remove Spaces from Filenames

Easy File Renamer is distributed with verifiable digital signatures

Method 1: Use Windows Batch Script

If you only want to remove spaces from files without caring about the kind of files which will be affected, working with a Windows Script is the ideal approach. Here is how you’ll have to go about:

  1. Copy all the files you want to rename without spaces in a single folder.
  2. Create a new text file in the same folder and paste the following script in the text file:
    @echo off
    setlocal enabledelayedexpansion
    for %%j in (*.*) do (
    set filename=%%~nj
    set filename=!filename:.=!
    set filename=!filename: =!
    if not “!filename!”==”%%~nj” ren “%%j” “!filename!%%~xj”
    )
  3. Save the text file and change the extension of the text file from .txt to .bat.
  4. Now double click the .bat file and all the files in the folder will be relieved of any spaces in their names.

 

Method 2: Use Easy File Renamer

Easy File Renamer provides a more simple and efficient way to remove any empty spaces in filenames. Use this guide to get rid of any space(s) in filenames to signal a more uniform approach in how files are named on your computer.

  1. Download and install Easy File Renamer.
  2. Launch the software and click the Add Files icon to add files you want to rename. Unlike the script provided in the last method, you can choose files from as many places as you want.
  3. Next, you head to the Step 2 drop-down menu. Here you can either select the Remove Text rule to remove space or go for the Replace Text to replace spaces with anything you want. You can even choose to apply more than 1 rule at the same instance.
  4. In the case of the former rule, select the textbox labeled Text and simply hit the spacebar once (to denote the space). For the latter, you will have to type in the relevant info in the Find and Replace textboxes.
  5. Once the relevant rule(s) have been selected, click the Add Rule button located just underneath.
  6. Click the Rename button on the botton-right corner of the screen to set the renaming process into motion.

Leave a Comment

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

Scroll to Top