Remove Spaces from File Names Easily December 5, 2019July 16, 2020 Raza Ali Kazmi Rename Data When you download new files, especially music, the file names may contain spaces and other unneeded information that you may not need. It can be a long, tedious task to rename these files bit by bit. Product Spotlight: Use Sorcim’s Easy Files Renamer to rename & remove spaces in filenames. EFR follows Google Software Principles. It will not ask you to provide email address to download the software. In this article, we’ll discuss a combination of the techniques which help to quickly remove spaces from filenames without taking up too much of your precious time. Use a Batch Script File A Batch script file allows you to automate jobs and perform them with lightning-fast speed. The file contains instructions to perform administrative and non-administrative operations affecting Windows functionality and/ or files stored on your computer. Right-click on the desktop and point to New. Select Text Document. Copy the following commands and paste them in the Notepad file. Note: Replace D:\Test with the actual path of the folder that contains files for which you want to rename spaces in the file names. Click on File | Save As. Use the name of your choice in the File name field, but don’t forget to add .bat the end. So if you want to save it as Rename Files, you will type Rename Files.bat. Now move this newly created batch file inside the same folder which contains data you want to rename. Double-click the batch file to execute the script. Important: You may also use different arguments or switches in the firstmost command :renameNoSpace /R D:\Test For example: Using :renameNoSpace with no arguments/ switches will rename all files in the current directory where your script file is stored Using :renameNoSpace /R switch will rename all files in the current folder, including all of its subfolders Using :renameNoSpace SubFolder1 will batch rename files only from the sub-folder named SubFolder1 located in the current directory Using :renameNoSpace D:\Test will rename files from the D:\Test directory If your folder path contains spaces (for example, D:\Test Folder), you may want to use the same command with quotation marks :renameNoSpace “D:\Test Folder” If you want to rename files from all the sub-folders located inside D:\TestFolder, use :renameNoSpace /R D:\TestFolder Use Windows PowerShell You can also use the PowerShell commands to remove spaces from filenames. Windows PowerShell is a complex command-line tool that acts as an automated task framework and a scripting language for advanced Windows users. Click on Start and type PowerShell in the Search box. Right-click Windows PowerShell, and select Run as administrator. Use the following command to set your active directory to: CD D:\Test Execute the following command to rename your files in bulk. Use File Explorer The File Explorer (previously known as Windows Explorer) does not support the automatic renaming of files. However, sorting your files in alphabetical order and using keyboard shortcuts to rename files is a very simple task. Here’s how: Open the File Explorer from the taskbar icon. Navigate to the directory that contains the files you need to rename. Click the View menu and select the List option. Right-click on an empty area of the File Explorer, point to Sort by and select Name. Your files will now be sorted in alphabetical order. Select the topmost file and press the F2 key to rename it. Now type the name of your choice and press Enter when you’re done. Press the Tab key to jump to the next file. Repeat the steps until you’ve renamed all the files. Software Method Another way to rename bulk quantities of files is to use the file renaming tools such as the Easy File Renamer program. The whole renaming job of removing spaces revolves around 5 simple steps: You add the files you want to rename. You select the relevant renaming rule (Remove Text) and insert a single space in the Text field. Selecting the Remove Text Rule and applying the relevant settings You will now select Remove All (to indicate all spaces in the name to be removed). You click the Add Rule button. You click the Rename button in the user interface. You select Yes in the prompt. You don’t need to be equipped with any complex technical know-how of PowerShell commands to use this software. This is a safe and easy method because entering incorrect commands in PowerShell could possibly cause a lot of harm to your computer system.