Alright, so here's my deal. I'm not the most profficent with DOS batch commands, but I'm trying to create a scheduled task to handle removing a word from all files in a specific folder daily.
The folder contains files named like this:
I want to remove the _white from all filenames, no matter where it is.
The examples I've found, described below, break when there are two dots in the statement, breaking the delims, I believe.
For what it's worth, the _white word should always be right before the jpg, so if there was a way to remove "_white.jpg" and tack on .jpg, that would work as a solution.
@echo off&for %%f in (*_white*) do call :ProcessFile %%f
for /F "delims=_. tokens=1,3" %%c in ("%1") do ren "%1" "%%c.%%d"