Gpg.exe and long dir names

John Clizbe
Thu May 22 18:53:03 2003

Hash: SHA1

Colin Brown wrote:
>  I am having a bit of trouble with GnuPG and was wondering if anyone
can help.
> I am trying to feed a file into gpg.exe inside a front end I am
writing, the problem being gpg does not like
> the full path name for the file
> eg. C:\Documents and Settings\Person Here\My Documents\Visual Studio
> And seems to fallover,
> It is fine when it is just the root dir C:\file.txt
> I can *hack* around this by copying the file to the root dir before
encrypting and then copy it back prefer not to do that.
The trouble is the spaces in the file/path names. A few ideas from my
own battle scars using unix/Gnu/OpenSource stuff in a Win32 world:

1) Put entire filename and path in quotes - "C:\Documents and
Settings\Person Here\My Documents\Visual Studio

2) use 'old-style (8.3)' file and folder names -

3) If not already using it, try the Nullify build of GnuPG

4) I agree using the root dir is a 'not good' hack. What about using

5) Unix-fy the path - ie replace '\' with '/' and escape the spaces
with '\' -  "C:/Documents\ and\ Settings/Person\ Here/My\
Documents/Visual\ Studio\ Projects/WindowsApplication2/bin/Debug/file.txt"
Though I think this only works under Cygwin, MinGW32, or Services for
Unix's Interix environments and quotes around the name would be easier.

There may be other hints on MSDN. Try

- --
John P. Clizbe                     Inet:   JPClizbe AT attbi DOT com
Golden Bear Networks               PGP/GPG KeyID: 0x608D2A10
  "Most men take the straight and narrow. A few take the road less
traveled.  I chose to cut through the woods."
  "There is safety in Numbers... *VERY LARGE PRIME* Numbers
9:00PM Tonight on _REAL_IRONY_:  Vegetarian Man Eaten by Cannibals
Version: GnuPG v1.2.2-nr1 (Windows 2000)
Comment: Using GnuPG with Mozilla -