hi all
I need to design a batch file. this file will compare two dirctories. One named "script" and contains script files with .oam extension. The oter named "jobs" and contains subfolders.
If the a subfolder names in "jobs" is as same as a script name in "script", then delete it.
I have this code
@echo off
set sdir=c:\script
set jdir=c:\jobs
dir /a:-d /b %sdir% > slist.txt
dir /a:d /b %jdir% > dlist.txt
for /f %%x in (c:\slist.txt) do for /f %%y in (c:\dlist.txt) ...
In the nested for look I want to compare %%x and %%y+".oam". If they are same, I will delete %jdir%+"\"+%%y .
I dont know if my logic or designing is correct or not. please give me any suggestion.