Wildcard Needed In Batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
GeroldK
Posts: 1
Joined: 05 Nov 2015 05:38

Wildcard Needed In Batch

#1 Post by GeroldK » 05 Nov 2015 05:57

Hello,
i need help with deleting some folders in the Firefox History.
The script works fine so far but deletes too much.

IF EXIST "C:\Users\" (
for /D %%x in ("C:\Users\*") do (
del /f /s /q "%%x\AppData\Local\Mozilla\Firefox\Profiles\*"
)

--> It deletes everything in \Profiles -> Users loose their Settings like starting-Page.
What it should do is something like:

del /f /s /q "%%x\AppData\Local\Mozilla\Firefox\Profiles\*\ONLY the Folders\
-> How to set a working wildcard on the "*" position?
Thanks for help!

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Wildcard Needed In Batch

#2 Post by Squashman » 05 Nov 2015 08:06

Use another FOR /D as an inner loop.

Post Reply