I have been informed that a bunch of folders on our network at work have a folder called Site Plan and one called SitePlan. I've been tasked with going through and consolidating them.
I wrote a batch file that searches the network for such instances. The batch file works well EXCEPT for the fact that someone created folders called 100% CD or some variation of that.
Is there something that can be done to allow the batch file to CD to a folder whose name includes a percent sign?
Here's my current t batch file.
I wrote a batch file that searches the network for such instances. The batch file works well EXCEPT for the fact that someone created folders called 100% CD or some variation of that.
Is there something that can be done to allow the batch file to CD to a folder whose name includes a percent sign?
Here's my current t batch file.
Code:
@echo off
if '%1'=='loop1' goto loop1
for /D %%p in (*.*) do call %0 loop1 "%%p"
goto end
:loop1
cd %2
echo "%CD%"
if not exist "Site Plan" goto next
if not exist SitePlan goto next
echo "%CD%">>q:\test2016-02-10.txt
:next
call %0
cd ..
goto end