A little bit of a background of what I'm trying to fix. We have files that are created daily that get dumped in a folder that's created for the current day. Some of these files get created with a 0 in front of them. So, 0123456, for example. I'm trying to come up with a batch script that removes the 0 from those files. I came up with this:
@echo off
ECHO Checking HNS for Pics that start with a "0"
For /R "D:\Shared\Quality Photos\TEST2\TEST\" %%a in (0*.*) do ren "%%a" " *.*"
It removes the 0 but replaces it with a space. So, I add this line to the code and it errors out:
For /R "D:\Shared\Quality Photos\TEST2\TEST\" %%a in ( *.*) do ren "%%a" %%a
Thoughts on how to resolve this?