Question

First sorry, I know this has been answered 100 times but I don't understand how to make the scripts I find do what I need.

Second sorry, I asked this a few days ago but was not thinking right at the time and my post was put on hold or something..

Okay, I need to edit multiple file names at once.

The files will always start and end with the same things example: "MOVIES Iron Man 3 watch now.flv"

I need to remove the "MOVIES " and " watch now" from the file titles. I have no clue how to do this nor where to start. If someone can show me a working example or write me a simple script that someone with no understanding of .bat file scripts can use it would be awesome!

Please and thank you!

If it helps I run windows 8.1

Was it helpful?

Solution

Here is a non-destructive solution that will merely write a file called renfiles.bat.txt and you can examine it in Notepad to see if it is doing what you want, before renaming it to a batch file and launching it to do the renaming.

It depends on the exact text being typed where you see it in the batch file, and the space after Movies as well as the space before watch is included in the change.

Change the c:\base\folder to the path where all your folders and file are.

This uses a helper batch file called repl.bat - download from: https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat

Place repl.bat in the same folder as the batch file or in a folder that is on the path.

@echo off
cd /d "c:\base\folder"
dir /b /s /a-d |repl ".*\\MOVIES (.*) watch now(.*)" "ren \q$&\q \q$1$2\q" ai >renfiles.bat.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top