Questions tagged [batch-rename]

This tag is about the renaming of large batches of files.

This tag is about the renaming of large number of files. This is often scripted or done via a dedicated program.

331 questions
85
votes
13 answers

Is there a way to batch rename files to lowercase?

I need a way to rename all files in folders and subfolders to lowercase. I'd like to know if there is a way to do that using only windows (XP or 7)
ino
  • 1,575
27
votes
6 answers

Add text to end of filename (but before extension) using batch file

I have a list of files which are in the format on the left. I want to append a string to each file name, but before the extension, as shown: File 1.txt -> File 1 version 1.txt File 2.txt -> File 2 version 1.txt File 3.txt -> File 3 version…
TheTurkey
  • 1,111
25
votes
4 answers

Mass Remove File Prefix on a Mac?

How do I mass remove file prefixes in a Mac? For example, inside my folder, I have the following files: img_sometext1.jpg img_sometext2.jpg ... img_sometext10.jpg How do I remove img_?
Propeller
  • 1,195
19
votes
4 answers

PowerShell: How do I append a prefix to all files in a directory?

Currently I'm using cmdlets like: dir | rename-item -NewName {$_.name -replace "-","_"} But now I need to add a prefix to the filename for all files in the directory. I can't predict how long each filename is (it varies), so I can't just use a…
Giffyguy
  • 1,062
19
votes
2 answers

How to add a prefix to all files and folders in a folder? (windows)

The following command only changes the name of the files but not the folders. for %a in (*) do ren "%a" "00_%a"
MatMis
  • 305
15
votes
8 answers

Add .mp3 to the end of file names

I moved all my songs off my phone to a flash drive. Then I uploaded them to my new phone, only when they were stored to the flash drive they come over missing the ".mp3" so they are seen as "file". If I rename each file, adding the ".mp3" the file…
jeff
  • 167
  • 1
  • 3
14
votes
5 answers

How to recursively rename files/folders to make their names Windows-friendly?

I have a bunch of files on a Ubuntu box, which have various characters in their filenames that Windows doesn't accept (mostly ":" and "*", but possibly others). What's the simplest way to get these all renamed and moved to a Windows machine? It's OK…
RomanSt
  • 9,959
12
votes
4 answers

Can I rename files in a directory with Vim?

If I open a directory in vim using vim . I will get a file-browser-type interface of the current directory. From there I am expected to browse to a file, and then start editing it. I want to use this interface to rename files. Normal vim rename…
Questionmark
  • 451
  • 1
  • 4
  • 18
12
votes
1 answer

Bulk rename .jpeg to .jpg

I have over 100,000 images in a complicated folder structure similar to the one below: ├── folder1 │ ├── 0001.jpeg │ └── 0002.jpeg ├── folder2 │ ├── 0001.jpeg │ └── 0002.jpeg ├── folder3 │ └── folder4 │ ├── 0001.jpeg │ └──…
11
votes
5 answers

How to rename multiple files in multiple folders with one command

We want to rename our *.html files to *.php but (sadly enough) have not enough knowledge to do it with a cmd prompt command and/or batch file. The problem is that each file is in separate folder – and I am talking about 750+ different folder…
Charles
  • 263
11
votes
4 answers

Windows CMD: Add Suffix to all files in folder

I have a folder with 120 .cs files. What I need to do is add "DO" to every files name, before the extension. Heres what i came up with: ren *.cs *. //this removes all file extensions ren *.* *DO.cs // this should rename all the files and add the…
10
votes
2 answers

How to bulk rename audio files so that the file name matches the title metadata (preferably using Foobar2000)?

I have some audio files for which I used Foobar2000 to get the proper tags (Title, Artist, Album, etc), so now they have their proper titles when loaded in Foobar and other players, but they still do not have the proper names as seen in Windows file…
user162573
10
votes
6 answers

How to replace a single character in Windows filenames using a batch file?

I have a Windows Server 2003 server that has a whole bunch of filenames that need renaming. Basically, I just need all - (hyphens) replaced with _ (underscores), no matter where they are in the filename. Assume that there are no duplicates. I can do…
10
votes
3 answers

Is there a way to change multiple file extensions at once on Windows 10?

If I have a bunch of files with one file extension, is there a way to quickly change them to another file extension without having to manually change one file at a time? The Microsoft support page gives a method for quickly renaming many files, but…
user73910
  • 203
9
votes
2 answers

How do I remove non-ASCII characters from filenames?

I have several files with names containing various Unicode characters. I'd like to rename them to only contain the "printable" ASCII characters (32-126). E.g, Läsmig.txt //Before L_smig.txt //After Mike’s Project.zip Mike_s…
RJFalconer
  • 10,369
1
2 3
22 23