Output file to specific directory?

Peter Schott pschott at drivefinancial.com
Wed Dec 17 10:20:51 CET 2003


I know that it works with directory and filename specified as output
parameters.  I was just hoping for something that would output the file
(regardless of or without knowing the name) to a specified directory.  I
guess my original query wasn't too clear.  I'm not a great programmer
and stripping out the .PGP or .GPG extension in a DOS command line is a
little fuzzy to me.  That is what was giving me trouble.  I've figured a
way I can work around it with a MOVE command after the encrypt, so this
isn't a huge deal, but I was curious if there was a way to output to a
directory short of specifying directory + filename as output.  I've seen
other implementations of OpenPGP do that and was wondering if GPG could
as well.

Thanks.

-Pete Schott

-----Original Message-----
From: Lowell Porter [mailto:lporter at hdsmith.com] 
Sent: Wednesday, December 17, 2003 10:17 AM
To: Peter Schott; gnupg-users at gnupg.org
Subject: RE: Output file to specific directory?

I might be misunderstanding what you mean, but this worked for me.

I encrypted a file with my own public key and put the encrypted file in
a different folder:
C:\Inetpub\ftproot\bankchecks\gnupgp>gpg -o C:\test.gpg -e -r
my_public_key lowell.txt

I then decrypted the file and put the decrypted file in an entirely new
folder:
C:\>gpg -q -o C:\test\lowell.txt --yes --decrypt test.gpg


It shouldn't be too difficult to do this with VB Script. (or VB for that
matter) ... I've used VB script to create the command line for GPG.


-----Original Message-----
From: gnupg-users-bounces at gnupg.org
[mailto:gnupg-users-bounces at gnupg.org] On Behalf Of Peter Schott
Sent: Wednesday, December 17, 2003 8:06 AM
To: gnupg-users at gnupg.org
Subject: Re: Output file to specific directory?


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?

-Pete

On 15/12/03 11.35, Peter Schott wrote:
> I'm using the Windows port of GPG and am trying to place the encrypted

> or decrypted file in a different directory than the one where the 
> original file resides.  So far, I've found no way to push the output
to
> a different directory.  When I run GPG from the desired directory, it 
> still places the output in the directory with the original file.
>  
> Any ideas on how to make this work short of batching a move after the 
> encrypt/decrypt?  Is this even possible in GPG?
>  
> Thanks in advance.

I might be wrong, but how about doing something like:

  Find the current directory.
  Find absolute path of file.
  Cd to output directory.
  Invoke gpg command on file with absolute path.
  Cd to previous directory.

Would that work?

/dossen




_______________________________________________
Gnupg-users mailing list
Gnupg-users at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users






More information about the Gnupg-users mailing list