Questions tagged [batch-rename]

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

Filter by
Sorted by
Tagged with
8 votes
3 answers
4k views

How can I skip a cycle in a FOR loop?

I am running a Batch script for processing some files. When it determines that the current file needs no processing I would like to skip the rest of the commands for that file and move directly to the ...
Bricktop's user avatar
  • 313
-1 votes
1 answer
104 views

rename files recursively by adding a string at the beggining of file in linux

i tried many commands. No one did the job. how to use rename / find or something else to add a string at the start of files in subfolders, reculsively? example file.jpg --> image_file.jpg find . -...
Estatistics's user avatar
3 votes
1 answer
74 views

PowerShell: How to Batch Rename Using Split

I'm new to PowerShell to try and Batch Rename files. I'm deleting unique fields from the file which I managed to Using Split. I can't figure out how to Rename them. This is how I got the file names to ...
KoKee's user avatar
  • 33
7 votes
2 answers
4k views

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 ...
user73910's user avatar
  • 173
0 votes
2 answers
197 views

Proton Drive file renaming and data duplication issue [closed]

I use Proton Drive to backup some of my data, and at one point when I was trying to restructure the directories within my Proton Drive account I found, some hours later after I had awoken, that Proton ...
ZealousIdeal's user avatar
2 votes
2 answers
240 views

Powershell (windows 11) move files and rename

I am trying to write PowerShell that will allow me to clean up files and place them into folders and rename them to include a date in the filename, and once I work out the commands, I will script it. ...
psycoperl's user avatar
0 votes
1 answer
207 views

Can I use a .bat file to rename all the FOLDERS in a directory?

Can anyone please help me figure out how to strip-off or remove part of all of the FOLDER names in a directory? I’m trying to remove this 7 character string “SSA RI ” (including the middle and ...
ron's user avatar
  • 3
1 vote
0 answers
198 views

Flatten Folder Structure, Move Files from Sub-Folders to Main

In Windows command line, is there a way to bulk move all the contents of subfolders up some levels? In other words, a way to get rid of selected subfolders while keeping their contents? I would like ...
rodfeli's user avatar
  • 11
0 votes
2 answers
311 views

How to use Command-line to batch-rename the FOLDER prefix using wildcards

So it has been mentioned that REN can be used to rename a FOLDER, but wildcards are not allowed. I have a directory with a couple of hundred FOLDERS, where I want to remove the first seven characters (...
ron's user avatar
  • 3
1 vote
1 answer
211 views

find and rename base directory and files under each basedir, add a prefix

I would like to recursively rename all matching directories and files under a path with a prefix that depend from the current directory. . ├── G1_BIN_REFINEMENT │   └── marker_genes │   └── ...
user1967473's user avatar
1 vote
2 answers
274 views

Batch remove irregular suffix from folder names

I have a series of folders named in the following fashion: 11.23 John Smith 12.912 Kate Spade 23.34 Alexander McQueen 22.E01 Michael Kors I want to rename the folder names to just: 11.23 12.912 23.34 ...
AustraliaX's user avatar
3 votes
1 answer
510 views

Windows Explorer doesn't show updated names when changing capitalization (multiple files via script)

If I have 5 or more files in a Windows Explorer folder and I rename them with a script that only changes capitalization, Explorer doesn't automatically "refresh" and show the new names in my ...
Paul K.'s user avatar
  • 73
0 votes
2 answers
332 views

Code that batch renames all .png files with increasing numbers, but how to i add so that the same happens with .jpg files too?

Workflow: use cd FilePath\Folder first write ls to get the files read code that works with .png files only: Get-ChildItem *.png | ForEach-Object -Begin { $count = 1 } -Process { Rename-Item $_ ...
Jonas Helt's user avatar
0 votes
3 answers
549 views

Renaming files with batch file by "substring" part of the file name

I have loads of files that I want to rename using a batch file, they are music files in this case and start with artist name, album then song number an finally the song name. I want, if possible ...
Barreto's user avatar
  • 121
0 votes
2 answers
424 views

Remove all characters in multiple filenames, that follow a specific character, in Mac OS

Trying to find a script, or app, that batch removes filename clutter following proper formatting. For example this Exercise [2009] previous version.png into this Exercise [2009].png I need the final ...
Major Van Bloodnok's user avatar
0 votes
2 answers
967 views

Is there a way to mass rearrange parts of a file name for many files in Windows Command Prompt?

I have a folder of files where the names of the files are dates. I need to change the names of the files from mm-dd-yyyy.eXtension to yyyy-mm-dd.eXtension. This is what I currently have: 03-31-2019....
amanwebb's user avatar
  • 101
1 vote
1 answer
44 views

Recursive rename with negate filter not working

I want my script to recursively rename all .mov files to _Proxy.mov, BUT I also want it to SKIP any files already named _Proxy.mov. The below command is still renaming all .mov files, and is ignoring ...
Sam's user avatar
  • 11
0 votes
1 answer
643 views

Batch Rename - Parent folder + text + Incrementing Number per directory

I'm trying to build a batch file which will carry out a rename of all subdirectories in a location in the format of 'parent directory filename' followed by underscore followed by '4 digit incrementing ...
Ben's user avatar
  • 3
0 votes
1 answer
897 views

Rename all file in a Folder

I am trying to rename all the file in a folder using this: @echo off setlocal EnableDelayedExpansion for "%file_path_history%" %%a in (*.*) do ( if not "%~nx0"=="%%a" ren ...
Gimmy88's user avatar
1 vote
3 answers
2k views

How to trim multiple file names using batch file

I need to trim all file names in a folder on a daily basis and therefore am searching for batch file recommendations. Any help is much appreciated!! The numbers behind the file names are changing on a ...
Lisa's user avatar
  • 11
0 votes
1 answer
116 views

Power Tools Renaming "Author - Title" to "Title (Author)"

I want to use Power Toys' Power Rename utility to rename some PDFs that have their filenames in the form of "Author - Title" to "Title (Author)". Can anyone help me with the ...
DANI3L's user avatar
  • 1
1 vote
1 answer
1k views

Rename files based on specific text in file, file contains lots of Spaces and other text

I have been trying to get this to work without success. I have searched here and elsewhere for help and tried everything I could think of, the issue is its selecting additional text, I then get ...
Icebreaker 808's user avatar
0 votes
1 answer
293 views

How to add prefix to folder name using wildcard without using Powershell

i wanna create a batch script to rename C:\Program Files\WindowsApps\Microsoft.GamingServices_4.66.30001.0_x64__8wekyb3d8bbwe to +Microsoft.GamingServices_4.66.30001.0_x64__8wekyb3d8bbwe but version ...
amymor's user avatar
  • 35
0 votes
5 answers
913 views

Windows CMD - How to append .txt to the names of all no-extension files in a folder and its nested subfolders?

I copied all my files from Ubuntu to a new Windows 10 computer. Many of these files (literally thousands of them) are plain text files without extensions ... Every time I try to open one of these ...
Fred Flintstone's user avatar
0 votes
3 answers
681 views

Batch Rename Files by Switching Two Parts of the Name

I'm new here and don't have any coding knowledge or experience or software, but I use Windows 10. I have LOTS of files named like:(1) 2020-03-12.mp3(7) 2021-04-10.mp4(6) 2022-08-25.docxetc.They're mp4,...
Laishan Chan's user avatar
1 vote
1 answer
533 views

How to batch rename Files, moving character to the end

Having previously used batch files to rename files with success, I thought this would be possible, but I just cannot get it to work for this case. I have the following files which I'd like to rename ...
supermonkey's user avatar
0 votes
3 answers
1k views

How can I batch rename files on Windows 7?

I have many files like these: simple-1.gif simple-2.gif simple-3.gif I want to use command prompt to rename them all with the same pattern so they look: aa1.gif aa2.gif aa3.gif I tried with this: ...
Cain Nuke's user avatar
  • 179
0 votes
1 answer
2k views

How to implement regex on a powershell find and replace to quickly change file names in windows 10?

Hi I have a set of files in a folder (windows 10) that are named something like this: asfdjlaksjfdi09908jfakl.part1.rar aabdjkhihsdjkf.part2.rar sdjklufia9798uiownlnsadkfasdFASDFrwe34342.part3.rar ... ...
easy ijoijo's user avatar
0 votes
2 answers
5k views

Powershell command (in batch file) to remove last 3 characters (before extension) from file name?

I have mp3 files (with names of different lengths) and want to remove the last three characters before ".mp3" for each mp3 file next to the batch file. For example foobar043.mp3 needs to ...
bat_cmd's user avatar
  • 541
0 votes
1 answer
618 views

Is there an easy way to bulk swap the file names of two files in Windows?

Is there an easy way to bulk swap the file names of two files in Windows? I have File_A.txt and File_B.txt and after the operation, File_A.txt is now called File_B.txt, and vice versa. :: Old Name ...
JOOT49's user avatar
  • 11
0 votes
2 answers
1k views

Move part of the filename to the front of the filename

I want to move a part of the filename to the front of the filename. All my files have a delimiter # in them, such as: 2585#xxxxx#4157.pdf. Now I want to move the part after the last # to the second ...
Robert's user avatar
  • 49
0 votes
1 answer
716 views

Rename files from different to same name with different extension

I have 12 folders with each containing two subfolders: "Images" & "Json". Now each "Images" folder has 10 image files named from 1.png to 10.png and each "Json&...
NewbieProgrammer's user avatar
1 vote
1 answer
4k views

Replacing characters in multiple folder and file names

I have a large movie library using Plex (Local Media Server) and have named multiple files in the wrong order. Plex will disregard square brackets when searching file names for a corresponding movie. ...
Pete's user avatar
  • 13
0 votes
0 answers
1k views

How to remove a section of multiple file names?

I have many files with a wildcard section I'm having to manually remove and was wondering if there was a way to do it automatically, for example I would want to rename: Perfect Dark#43DDCBF0#2#0#...
Xii's user avatar
  • 1
0 votes
1 answer
181 views

Remove .txt extension from all subfolders

Is it possible to create a batch file that removes all instances of .txt extension appearing? I tried the following, but it doesn't work for me. for f in *.txt; do mv -- "$f" "${f%.txt}&...
Kuhan Mani's user avatar
0 votes
2 answers
974 views

Powershell: How do I shift a date (format: yyyymmdd) from any position in the file name to end of the file name?

Currently im using dir | Rename-Item -NewName {$_.name -replace "",""} to rename files in a directory. The file names vary and need to be unified. Examples for file names: ...
schwadinho's user avatar
0 votes
1 answer
188 views

Find and replace from a different text document from each new line

I have some file conversion software that which works through cmd and doing something along the lines of: converter.exe input.wav -o output.wav --ffmpeg "-af volume=0.1" I'm trying to ...
kjm22741's user avatar
0 votes
1 answer
2k views

cmd gives me an error i was unexpected this time in a batch rename loop

I am very new to cmd and I have a problem rename a batch of .jpg files. I found this script and it gives me the error i was unexpected this time. for i in *.jpg; do mv -i "$i" ${RANDOM}.jpg ...
Paul's user avatar
  • 1
0 votes
1 answer
2k views

Make The Folder Name The Same As The File Names

I have a directory structure as below: Folder > FileName1.abc > Filename2.abc > ............. Folder2 > FileName11.abc > Filename12.abc > .............. >...
Marco's user avatar
  • 3
1 vote
2 answers
2k 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....
D. Tunus's user avatar
  • 135
1 vote
0 answers
101 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 ...
Roxion's user avatar
  • 354
0 votes
2 answers
967 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_*.*...
Martyn's user avatar
  • 111
4 votes
2 answers
3k 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 ...
Vahn's user avatar
  • 650
3 votes
2 answers
703 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 ...
olpdog's user avatar
  • 87
0 votes
2 answers
3k 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 ...
HTWingNut's user avatar
  • 499
0 votes
0 answers
53 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 ...
Mafsi's user avatar
  • 113
3 votes
1 answer
520 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 ...
Roxion's user avatar
  • 354
0 votes
0 answers
46 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. ...
Zero Pancakes's user avatar
0 votes
1 answer
264 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 ...
Riyad Delloul's user avatar
1 vote
1 answer
794 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 ...
Mikhail T.'s user avatar

1
2 3 4 5
7