Find folder name based on string value with batch

Posted by MaQleod on Stack Overflow See other posts from Stack Overflow or by MaQleod
Published on 2010-04-03T16:06:07Z Indexed on 2010/04/03 16:13 UTC
Read the original article Hit count: 294

Filed under:

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?

© Stack Overflow or respective owner

Related posts about batch