Questions tagged [batch-rename]

Batch renaming is a form of batch processing used to rename multiple computer files and folders.

Batch renaming is a form of batch processing used to rename multiple computer files and folders in an automated fashion, in order to save time and reduce the amount of work involved. Some sort of software is required to do this. Such software can be more or less advanced, but most have the same basic functions. Batch renaming software exists for most operating systems.

Reference: Wikipedia

924 questions
2
votes
1 answer

Rename files, using text-file as source

In a folder, i've 600 files, numbered from 001 to 600. It looks like foo_001.bar. In a text file, i've the number & titles of this folder. Now i want to rename foo_001.bar with the corresponding 001 title foobar from the text file. But i don't have…
MatthijsG
  • 175
  • 1
  • 12
2
votes
1 answer

Script to compare two different folder contents and rename them based on minimum similarity

Story: I have multiple folders with 1000+ files in each that are named similar to each other but are slightly different but they relate to the same content. For example, in one folder I have files named quite simply "Jobs to do.doc" and in another…
2
votes
1 answer

How to rename the files in the path with the new names from the .txt file in batch?

I have two .txt files. The first one contains the list of pathes to the CD-Images: C:\Users\N\Desktop\LOG_Dateien_CD_Imaging\BFU_KONGRESS_9.ISO C:\Users\N\Desktop\LOG_Dateien_CD_Imaging\NDC2005.ISO The second one contains the new names for this…
Oleg_08
  • 447
  • 1
  • 4
  • 23
2
votes
2 answers

Batch filename rename with conditional or math operation

this is my firt question here. Thanks in advance. I have automatically uploaded hundreds of images to a Webfaction server with an incorrect timestamp in the filename and now I have to rename them. Here is an…
2
votes
2 answers

Bulk rename files in Unix with current date as suffix

I am trying to bulk rename all the files in the current folder with date suffix: rename 's/(.*)/$1_$(date +%F)/' * But that command is renaming info.txt to info.txt_1000 4 24 27 30 46 113 128 1000date +%F). I want the result to be…
sus
  • 496
  • 1
  • 6
  • 14
2
votes
1 answer

Is there a way to rename directories recursively without using sed or rename?

I am trying to rename a few directories that contain "Fever" to contain "Malaria" instead. The instruction is to do it without sed or rename. So far, my errors include mostly lines like mv: cannot stat…
2
votes
1 answer

Remove 'x' Characters at Beginning of File Name Using Batch Scripting

I frequently burn CD's, download music, movies, etc, and one thing that almost all the files have are some numbers in the beginning of each file name designating order. ("01.FILE_1, 02.FILE_2"...) Using a batch file I would really like to be able to…
user6533701
2
votes
2 answers

Renaming bunch of files with their parent folder name on OS X

I have files as follows: (Some files are located inside nested folders) /1/asd.m /3/asd.m /4/2/asd.m I want to rename .m files with a suffix of their parent folder name. The result should be like this: /1/asd1.m /3/asd3.m /4/2/asd2.m How can I do…
Elander
  • 63
  • 6
2
votes
2 answers

Renaming files with its path name to proper case using zmv or rename

How can I convert all filenames and leading directories to titlecase (proper case) using zmv command. One starting example I found to start with at : autoload -U zmv zmv '(*).(*)' '${(C)1}.$2' The above would not work if files are within…
jethar
  • 2,223
  • 2
  • 22
  • 19
2
votes
1 answer

Replace only first occurence of a character in filenames

I have a folder with many files. What I want is to replace the first matching character of each file. For example I have aabbc.txt aaabbxx.txt aacbbbv.txt I want to replace the first "b" with a "z" the result will…
Ahmed Karmous
  • 373
  • 2
  • 10
  • 25
2
votes
2 answers

How to add recursive directory to batch file

I have the following batch file: @echo off for /f "delims=" %%F in ( 'dir /b /a-d [*]*' ) do for /f "tokens=1* delims=]" %%A in ( "%%F" ) do for /f "tokens=*" %%C in ("%%B") do ren "%%F" "%%C" I want launch it in the root directory and have it…
Dizzy49
  • 1,360
  • 24
  • 35
2
votes
3 answers

How to rename all files to lowercase (solved) and simultaneously spaces to underscores

I am trying to convert all files to lowercase in a directory tree and subsequently move spaces to underscores or hyphens. The first part I was able to get by searching which uses below code. find . -depth -print0 | xargs -r0 perl-rename -n…
vikan
  • 35
  • 3
2
votes
2 answers

Renaming multiple images with .rename and .endswith

I've been trying to get this to work, but I feel like I'm missing something. There is a large collection of images in a folder that I need to rename just part of the filename. For example, I'm trying to rename the "RJ_200", "RJ_600", and "RJ_60"1…
KnightIK
  • 31
  • 4
2
votes
2 answers

How do I add 11 to %%i?

I tried set /p input2= FOR /L %%i IN (1,1,%input2%) do ren text_%%i.txt worked_%%i+11.txt and it just tries to rename text_1.txt to worked_1+11.txt How do I do it properly? Thanks in advance
TheEisbaer
  • 103
  • 2
  • 12
2
votes
3 answers

Fastest way to check for the highest filename in sequence with Batch file?

I'm attempting to use a batch file to keep all files in a particular folder numbered sequentially (0,1,2,...). To do this I first require knowing what the highest number in this sequence is so I can append the non-sequentially named files to the end…
Jimpi27
  • 21
  • 3