Questions tagged [batch-rename]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
30 views

How to add a partial phrase to multiple file names at the same time in Windows Explorer?

I have files named 1.png, 2.png, 3.png, etc, going all the way up to 500 image files. I intend to put a word in front of the number, so the new file names would be alpha-1.png, alpha-2.png, alpha-3....
-1
votes
0answers
11 views

Is there a code I can run to format names of files uploaded into file explorer folders to a certain format based on user input? [duplicate]

I want files uploaded into a certain file to have a naming format SAP # + Account # + Type of drawing. I've got tons of files being dropped into various folders all with different naming formats and ...
1
vote
0answers
13 views

Incremental renaming files in wget2

How I can rename files in incremental img001.jpg, img002.jpg,img003.jpg in below. i tried -o, as i am downloading multiple files from text files, the files gets truncated. -o is building a one large ...
0
votes
2answers
50 views

Using Windows rename to replace a single underscore with a double?

Can anyone advise me where I am going wrong with this? I have some file names that contain XXX XXX_Layer_XXX and I'm trying to replace to XXX XXX_Layer__XXX My attempt so far was: ren "*Layer_*.*...
3
votes
2answers
443 views

How to rename my folder and any of its subfolders into lowercase using command prompt in Windows?

I have many folders and subfolders. They have random uppercase or lowercase letters in their names. I'd like to rename all of them into lowercase version. I see many answer here about renaming files ...
3
votes
2answers
491 views

Batch command to rename filenames like 'The Kids Performances (2020).mp4' to 'Kids Performances, The (2020).mp4'

My family has recordings of the children's performances in school and extracurricular activities saved over the years as primarily .avi and .mp4 files. I have been asked to take all these files (there ...
0
votes
2answers
32 views

Best way to Delete characters from Filename after a specific string of characters in Windows

I was wondering if there's a quick an easy way to search for filenames with several characters and delete all the characters after those. For example if I have a file called: Great Movie Title 2021 ...
0
votes
0answers
29 views

How to append time of creation to a file and to all WikiLinks instances where appear inside a text?

I'm using Obsidian as a zettlekasten app. I have a vault of 1000+ .md files with my notes. Some of them are linked inside other notes via wiki links. I want to change all my .md file's name by ...
3
votes
1answer
49 views

How I can rename txt files according to first line of text file? [closed]

I have multiple .txt files and I want to rename them as first line text they contains. First line in every text file is some number and text Example ParagraphL23 I want my text file to be renamed as ...
0
votes
0answers
33 views

Access is denied in one folder but not in another

I had a number of files that were downloaded from the internet and they were in Folder A. I tried to run a .bat file on them to rename them, but on every single file I got the error Access is denied. ...
0
votes
1answer
29 views

how can i output imagemagic image with the name of the containing folder in batch?

FOR /R %%a IN (poster.jpg) DO convert "%%a" -resize 256x256 -background none -gravity center -extent 256x256 "%%~dpna.ico" The current behavior is to grab every poster.jpg file ...
0
votes
1answer
78 views

Can git automatically rename files during clone/pull/commit?

We have a collection of scripts, which have, historically, had a different name-prefix depending on whether they are used in production or a lower environment. We're switching to git now, and would ...
0
votes
1answer
42 views

Shell - How to rename files in the midle of file name?

I have to resize images, and want to rename them on the fly Names are like following Compet-210-123456.jpg Compet-210-123457.jpg ... Compet-211-123555.jpg and I would like to inject 4k between two ...
0
votes
2answers
138 views

How can I rename a directory name replacing the first letter of each word in the name string to uppercase?

On a Windows 10 computer, I've been using free utilities like PFrank tool and Power Toys PowerRenamer. With PFrank I was able to change the case of each word in the name of the filenames to uppercase, ...
2
votes
2answers
195 views

batch file to rename folders creates new folders

Because I have multiple back-up copies of all files, I use the following batch file to rename files so that I don't have to go into each drive/folder to rename files manually. The batch file works ...
1
vote
2answers
60 views

How to rename files in all subdirectories

I need to rename all files in subdirectories. The names of the subdirectories are different, the file names are different, but they are always JPG files. I need a BAT script that will change the names ...
0
votes
1answer
103 views

Trying to parse a string that I generate in a batch file into a few values of an XML file

I'm trying to create V2 of my little batch file. I only know batch , so I'd prefer to do this if possible instead of powershell but if I have to, I have to. The app just copies five files that are the ...
6
votes
2answers
89 views

What did I do wrong in my batch?

I would like to change the file extension from .jpg to .txt. This must happen both in the current folder and in all sub-folders. What did I do wrong in my batch? for /R %%G IN (.) DO (rename *.jpg *....
4
votes
3answers
482 views

How to increase numbers in filenames by specified value with Windows 10 PowerToys's PowerRename?

I've got a bunch of files named as: 01. Filename.ext 02. Filename.ext 03. Filename.ext etc. I need to batch rename them with PowerToys PowerRename by increasing the number in the beginning of the ...
0
votes
2answers
453 views

Changing hyphens (-) to underscores (_) on Win10 for many files: Windows search hack

I have a directory with various files and some of the filenames have subparts separated with hyphens / dashes i.e. - e.g. foo-bar.pdf Unfortunately this seems to confuse Windows 10 Explorer's search. ...
0
votes
1answer
60 views

Renaming pdf files to include the parentfolder name as the prefix, and including a unique suffix

Please can you help. How can I rename pdf files to include the parentfolder name as the prefix, and adding DRAFT as a suffix? For example, for parent folder name \ABCDEF: xyc123.pdf fgh456.pdf I ...
0
votes
1answer
104 views

Script to add suffix to filename [closed]

Hi I am trying to add a suffix before the extension for all files in a folder. Is there anyway I can get a script to do this with notepad please. I cannot use any other means :-( Example files is my,...
0
votes
1answer
32 views

How to save and rename XML file automatically based on its object name [closed]

I have a hundreds XML files but with a random file names. They named like this: Bt_01.XML Bt_02.XML Bt_03.XML Bt_04.XML But they supposed to named like this: Button_Accessories.XML Button_Menu01....
0
votes
2answers
683 views

Batch rename multiple files by creation date [closed]

this is my first question in superuser. As you probably read in the title I would like to rename multiple files using a .bat file. I'm currently working on a project that involves books. In this case ...
0
votes
1answer
54 views

Windows rename multiple files from multiple folders having pattern

I have a folder in which there are multiple sub-folders(only one level) which has multiple files. Names have some dynamic prefix that I want to remove based on pattern in it. 1. ...
0
votes
6answers
813 views

Renaming a section of filename for multiple files in powershell or command prompt

I have some 100s of files having names like this: MOD15A2H.A2012001.h26v06.001.2015230181014_LAI500m.tif MOD15A2H.A2012009.h26v06.001.2015236194306_LAI500m.tif MOD15A2H.A2012017.h26v06.001....
0
votes
0answers
131 views

Accidentally renamed all files on desktop in windows 10 and they also got rearranged

I accidentally renamed all files on desktop in windows 10 and after that happened they all got rearranged and aligned to the left. I don't have file history and don't have a restore point on this pc. ...
2
votes
4answers
299 views

How to rename all the files and folders of files in a folder to have lower case names at once?

I have a folder with a bunch of textures and things that I need to rename to lower case, is there any way to rename all the files and folders of files in this folder to have lower case names at once? ...
2
votes
2answers
198 views

Windows rename multiple images

I have a folder containing only images: 1.png 2.png ... 11000.png I want to rename these files, adding a p as follows: p1.png p2.png ... p11000.png How can I achieve this, as I've tried the ...
1
vote
2answers
769 views

How do I rename the **entire** path

I need to rename (in particular not to copy nor to move) in Windows 8.1 this file path D:\Users\hynek0\1703.08094.pdf – zástupce to this path C:\Users\hynek0\1703.08094.pdf – zástupce Here, – ...
1
vote
1answer
119 views

How would I unnest multiple folders in Windows programatically?

So, I have a folder structure with some downloads that goes like this (I manually edited it a bit because it contains some sensitive data, which is not relevant to the question. The extensions are ...
1
vote
2answers
143 views

Recursively adding extensions to files in Windows CMD without renaming the subdirectories

I have a directory with several files that do not have a file extension. This directory also has several subdirectories that have the same thing. I am using the forfiles command to add a file ...
2
votes
3answers
2k views

Renaming multiple folder using command line

I am trying to rename multiple folders at once, removing the first few characters of their name: I found resource around but none of the command that I have tried worked: 2 - AT5CRO5JUDBWD4RUPXSQ 4 - ...
0
votes
1answer
366 views

Midnight Commander multi-rename with numerical values for new file names

With F6 we can multi-rename group of selected files in mc. I know, for example, how to search and replace using some regexp tokens subset in this menu. But how to proceed if I need rename a group of ...
4
votes
2answers
109 views

Removing part of files names and giving the name of one file type to another

Suppose I have a folder with rar and pdf files for a group of people. Each person has a unique code, and he/she is associated with two files Full name <unique code>_dummy text to remove.rar and ...
0
votes
2answers
45 views

Using MV to rename image files using a script

I am trying to rename a set of Tiff images 001, 001 x, 002 , 002 x sequentially. I am looking for the script to name image 001, 002, 003 and so on This is the script I am running. num=1 # Rename ...
0
votes
1answer
113 views

Batch rename files to grandparent directory name

Directory structure looks like this: D:\folder0\subdir1\scan0001.tif D:\folder0\subdir2\scan0001.tif D:\folder0\subdir3\scan0001.tif D:\folder0\subdir1\RAW\raw0001.tif D:\folder0\subdir2\RAW\raw0001....
0
votes
0answers
27 views

Renaming Parts of Multiple Folders

I have a large number of folders that contain the video regions on the folders which I would like to remove. For instance, some are PAL such as /Folder1 [PAL] Some are NTSC such as /Folder2 [NTSC] ...
2
votes
2answers
208 views

How do I get the current directory name in a windows command prompt inside of FOR loop?

I'm using Win-10 64-bit. Given the following directory structure on my windows machine... c:\tmp\Logs_UAT\ '-> folder1 | '-> test.txt '-> folder2 '-> test.txt ...I'm trying to ...
0
votes
2answers
63 views

Rename only the first part of a list of files (Windows 8.1 via cmd or Git Bash)

I need to rename a batch of files (in W8.1 using cmd or Git Bash terminal) from: "Cymatics - Oracle 808 1 - C.wav" "Cymatics - Oracle 808 2 - C#.wav" "Cymatics - Oracle 808 3 - D.wav" "Cymatics - ...
6
votes
5answers
2k views

How can I batch rename windows files where the % is a delimiter?

I have a lot of windows files where the filename contains a %. See below: c:\temp> dir /b 114902_T%3A%5CAccounting%5CPayables%5CAPA%5CBoshart Apr 25%5CBII_inv_1489879.pdf 114904_T%3A%5CAccounting%...
2
votes
3answers
1k views

Windows 10 Batch file to change directory names and move directories

I have fifty directories, in pairs, with names such as: ABC123-aaa-X0001 ABC123-bbb-X0001 XYZ456-aaa-X0001 XYZ456-bbb-X0001 SDF543-aaa-X0001 SDF543-bbb-X0001 I want to remove all the "-...
1
vote
1answer
262 views

ffmpeg file integrity check and rename on error with a batch file

I've found the code to check a file for errors and it creates a log file with the contents. Is there a way to alter it and rename a file that has errors but not the ones without? @echo off set "...
2
votes
6answers
313 views

How to rename files - Remove the name and keep the number

I need to rename a lot of files that contain a name and a badge number. The files look like this: "John Doe 1234.txt" and I must rename it to 1234.txt (new file must contain only badge number). ...
15
votes
8answers
7k views

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 ...
1
vote
1answer
66 views

How command Bulk Rename Utility to disregard case when removing characters or words?

I see nothing in red box for case matching or sensitive! I want it remove bunch characters or words regardless of upper or lower case!
1
vote
2answers
66 views

How to change multiple filenames preserving variable part of the name in linux terminal

I have thousands of filenames with this regular expression: (sp|li)_(test|train|val)_(loss|acc)_((1e-\d+)|(0[.]0{0,4}1))_curious_\d+_plasticity[.]npy Examples of it are: li_test_acc_0....
1
vote
2answers
927 views

Powershell Renaming All Files in Folder with Counter

I am writing a script that will rename all files in a folder to a given name (param) with in increasing counter. I want the counter to print with 3 digits (001, 002, etc). My code looks like it would ...
1
vote
1answer
83 views

Batch renaming filenames to remove part after last “ - ” ignoring extension

I'd like to batch rename files in a certain folder, removing the part after the last -, in the following way. hello world - Mr Sheep to hello world super user - question on super user.docx to super ...
1
vote
2answers
66 views

Renaming files by their folder's folder name on linux

I am a marker and I have a whole lot of coursework files given to me in a folder with a structure like this: student number --> coursework1 --> coursework.thy Each student has one folder named ...

1
2 3 4 5 6