(snip)
 >
 > According to the user's guide, the "\" character isn't
"special"
 > within sprintf, but it seems to be causing some problems here.
 
 Backslash is special in printf and sprintf: it's the escape character, and it must
be
 doubled to get a literal backslash. "\%" means a literal percent sign, which is
why
 the 'foo' variable was rejected (there being no corresponding conversion
 specifier). If there's a statement to the contrary in the User's Guide, it's
wrong.
  
My bad -- the "not special" nature is with string literals (p. 116), not
printf/sprintf.
 As a general comment, you're better using forward slashes in
filenames, even on
 Windows.
  
Good to know -- I get the expected behavior with this (also, of course with the
double-backslash).
Many thanks, Allin!
PS