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.

320 questions
84
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,555
  • 1
  • 15
  • 20
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
  • 9
  • 20
  • 29
24
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,061
  • 1
  • 8
  • 20
17
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
  • 285
  • 1
  • 2
  • 7
16
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,022
  • 10
  • 22
  • 38
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
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
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,553
  • 15
  • 56
  • 74
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 │ └──…
Andrew Brown
  • 223
  • 1
  • 2
  • 4
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
  • 1
  • 3
  • 10
10
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…
Master Azazel
  • 1,700
  • 2
  • 11
  • 16
9
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
9
votes
5 answers

Add folder name to beginning of filename

I have a directory structure as below: Folder > SubFolder1 > FileName1.abc > Filename2.abc > ............. > SubFolder2 > FileName11.abc > Filename12.abc > .............. > .......... etc. I want to rename the files…
shekhar
  • 155
  • 1
  • 3
  • 13
8
votes
4 answers

install rename command in cygwin

In linux exist the rename command, for rename a set of files with regular expresions. rename 's/prefix_//' *.jpg if I search in the cygwin package I find the renameutils package, but this don't install the the rename command, Install qmv and other…
juanpablo
  • 6,966
  • 11
  • 52
  • 72
8
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…
Matt Rogish
  • 775
  • 3
  • 10
  • 18
1
2 3
21 22