Get Location of Captures folder?

122 views
Skip to first unread message

Sean Schricker

unread,
Feb 4, 2010, 12:56:46 PM2/4/10
to Fiddler
Hello

I wrote a script to save selected sections with the full path. The
core of the script (after checking for and creating the directory
tree) is essentially
oSession.SaveResponseBody(sFiddlerCacheFolder
+toLocalFormat(oSession.url));

toLocalFormat() handles illegal path characters and
sFiddlerCacheFolder is a folder I created on my computer.

Because I want to share this script with other people, I'd like to
save the sessions with their full paths into the Captures folder like
"[mydocuments]\Fiddler2\Captures\groups.google.com\group\httpfiddler
\foo.jpg"

but SaveResponseBody does not save there. The following are my test
results:
1) No argument: saves without directory tree with session number
prepended (expected)
2) Relative path: saves relative to the fiddler program folder

So... Is there a property or method in the API where I can get the
location of the fiddler2 folder in mydocuments (or the Captures
folder)? I know that the location can be overridden in the registry
and the location will differ between XP and Vista+

Thanks!

EricLaw

unread,
Feb 4, 2010, 3:58:35 PM2/4/10
to Fiddler
Hi, Sean!

You should get the captures path as a string from the function call:

CONFIG.GetPath("Captures")


-Eric

Sean Schricker

unread,
Feb 4, 2010, 7:42:59 PM2/4/10
to Fiddler
Eric,

Excellent! I had a bunch of variables that my friends had to change
each time I issued an update. This will simplify things.

I also tested and found CONFIG.GetPath("TextEditor"), which brings the
count of such strings to zero :) (I still have some booleans that
they need to verify are to their liking, though)

I know you mention in the editor's ClassViewer to contact you for the
constants to GetPath()...

Can you please list those here or on the wiki so they're searchable?
Seeing lists of properties and methods and constants may trigger ideas
that people may not have had otherwise.

And any news on having regex replacements in the AutoResponder? (sorry
for adding not-too-related questions under this topic)

Thanks!
=-Sean

EricLaw

unread,
Feb 4, 2010, 8:36:45 PM2/4/10
to Fiddler
See: http://fiddler.wikidot.com/getpath

>And any news on having regex replacements in the AutoResponder

Sadly, this isn't anything that I will be able to get to soon. Of
course, as mentioned, you can use the Script Engine to do this sort of
thing.

> > > Thanks!- Hide quoted text -
>
> - Show quoted text -

Sean Schricker

unread,
Feb 4, 2010, 9:17:08 PM2/4/10
to Fiddler
Thanks, Eric!

-=Sean

Reply all
Reply to author
Forward
0 new messages