tags:

views:

56

answers:

1

I need to return a full directory name from inside a specified directory that contains .default in the folder name. Basically I'm adding a line in a backup script to backup firefox bookmarks, but the profile name is going to be different on every machine and I need a way to find the folder the bookmarks.html file resides without knowing the firefox profile name

I've looked at FIND and FINDSTR but neither seem to be what I need. I also looked at this post: http://stackoverflow.com/questions/2252785/windows-batch-file-get-folders-path-and-store-them-in-variable It was closer to what I'm looking for, but I just need a folder name, and to use something like regexp to find it

Any suggestions on commands to look at or strategies to use?

+1  A: 

Found a way to get the results I want:

FOR /D %%G in ("%USERPROFILE%\Application Data\Mozilla\Firefox\Profiles\*.default") DO Echo ***Found folder: %%G
MaQleod
You can mark your question as answered now, you sly dog you :)
ewall