Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
So I'm trying to do a nested loop in a batch script:
FOR /d %%B in ("C:\Documents and Settings" "C:\Documents and Settings\*") DO CMD /C FOR /d %%C in ("%%B\Application Data\Mozilla\Firefox\Profiles" "%%B\Application Data\Mozilla\Firefox\Profiles\*") DO del /S /Q /F "%%C"\cache\*.*
This obviously doesn't work.What am i doing wrong here?

Hi Andy,
One problem, separate from your batch, is that it's hard to tell where the line breaks are; bbcause of the way this forum wraps.
You may want to paste in your batch.
M2

Hi Andy,
No offense, but I can't make much sense of it.
It's got a fog index of about 6.5 on the Richter scale.
If what you need is to clean out those specific directorues, try this:
::=== cache cleaner
subst w: c:\mozilla\cache
del /s /q w:\
::==== you can guess the restBut, as with any automated deletion, a little caution goes a long way.
So if you're going to use w: as above, put this line BEFORE the subst:
if exist w:\nul goto :error
And near the end, AFTER the substs & deletes:
:error
@echo off
echo W is already in use. Nothing done.
M2

![]() |
GWBASIC program not getti...
|
Batch File Problems W2k
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |