Output file to specific directory?

Peter Schott pschott at drivefinancial.com
Wed Dec 17 09:56:04 CET 2003

	Thanks for the quick response.  Only reason I was wondering if
it was a bug was because other implementations I've seen output to the
current working directory rather than the same directory the file is
located.  No need to specify an output directory in the output file
	I'm not as worried about encrypting and adding a PGP/GPG
extension - it's decrypting and stripping the PGP/GPG extension that
gives me trouble.  I'm resorting to some MOVE statements to move
eveything that matches my parameters to the desired directory.  Not my
first choice, but it works.

	The main thrust of the thread was whether it was possible to
output to a specified directory without needing to know the filename as
well - just whatever comes out, place in directory X.  Seems the only
way to do that is by specifying the directory as part of the output file
name.  That answers my question.  May not have been the answer I wanted,
but I can make it work other ways.

Thanks again,

-Pete Schott

-----Original Message-----
From: Werner Koch [mailto:wk at gnupg.org] 
Sent: Wednesday, December 17, 2003 9:27 AM
To: Peter Schott
Cc: gnupg-users at gnupg.org
Subject: Re: Output file to specific directory?

On Wed, 17 Dec 2003 08:05:51 -0600, Peter Schott said:

> Unfortunately, that doesn't work.  It still decrypts the file to the 
> directory the original is located in rather than the current working 
> directory.  Seems strange to me, but I guess that's the way it's 
> designed.  Is this by design or is that a bug?


I did not follow the discussion, however what's wrong with either

  set filename=whatever
  gpg --output %filename%  %filename%.gpg


  set filename=whatever
  gpg --output <%filename%.gpg  >%filename%

I am sure there are ways to mangle filenames even under Windows.


Werner Koch                                      <wk at gnupg.org>
The GnuPG Experts                                http://g10code.com
Free Software Foundation Europe                  http://fsfeurope.org

More information about the Gnupg-users mailing list