Discussion:
Path for decrypted file with "--use-embedded-filename"
(too old to reply)
l***@gmail.com
2008-06-11 11:15:40 UTC
Permalink
Hello All,

Problem: Path where file is decrypted to if I use "--use-embedded-
filename".

I use Automate tasks for automatic decryption of incoming files.
Config / Control files are kept on "C:\Documents and Settings\All Users
\Documents\My Automate Tasks".

Now - when Automate decrypts file FileName.txt.gpg on "E:\Receive\TST"
with "gpg --use-embedded-filename FileName.txt.gpg" decrypted file
appears on "C:\Documents and Settings\All Users\Documents\My Automate
Tasks". When I do it manually by the same command file FileName.txt
appears, correctly, on "E:\Receive\TST", next to FileName.txt.gpg

Question: Is there any command that allows to set final path where
decrypted file should appear?
Guy
2008-06-11 13:18:07 UTC
Permalink
Post by l***@gmail.com
Problem: Path where file is decrypted to if I use "--use-embedded-
filename".
I use Automate tasks for automatic decryption of incoming files.
Question: Is there any command that allows to set final path where
decrypted file should appear?
You need to make your AutoMate script do the work in CurDir$
--
OpenPGP: id=18795161E22D3905; preference=signencrypt;
url=http://guysalias.fateback.com/pgpkeys.txt
l***@gmail.com
2008-06-11 13:31:17 UTC
Permalink
Script part responsible for decrypting files looks like this:

"C:\Program Files\GNU\GnuPG\gpg.exe --passphrase My_Password --use-
embedded-filename File_To_Decrypt.txt.gpg"

It works but decrypted file File_To_Decrypt.txt appears on "D:
\Documents and Settings\USER\Local Settings\Temp" or any other temp
directory set in "Environment Variable" in Windows.
David W. Hodgins
2008-06-11 16:48:23 UTC
Permalink
Post by l***@gmail.com
"C:\Program Files\GNU\GnuPG\gpg.exe --passphrase My_Password --use-
embedded-filename File_To_Decrypt.txt.gpg"
The File_To_Decrypt.txt.gpg must include the path to the file, or it
wouldn't be found.

You need to seperate the path, and the file name, and then
cd $path
gpg ... $filename

Regards, Dave Hodgins
--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
l***@gmail.com
2008-06-12 06:02:29 UTC
Permalink
When I do it manually and use i.e. "cmd", and go to "E:\Receive\TST"
and write:

gpg --passphrase MyPassword --use-embedded-filename FileName.txt.gpg
and then file appears in "E:\Receive\TST\FileName.txt".

But after runing Automate task:
Run command "C:\Program Files\GNUGnuPG\gpg.exe" --passphrase
MyPassword --use-embedded-filename E:\Receive\TST\FileName.txt.gpg
decrypted file goes to "C:\Documents and Settings\All Users\Documents
\My Automate Tasks".

Why result is different? It should be the same... :(
Guy
2008-06-12 07:03:35 UTC
Permalink
Post by l***@gmail.com
When I do it manually and use i.e. "cmd", and go to "E:\Receive\TST"
gpg --passphrase MyPassword --use-embedded-filename FileName.txt.gpg
and then file appears in "E:\Receive\TST\FileName.txt".
Right,

Need to make your AutoMate script change directory before invoking GPG.

ChDir "E:\Receive\TST\"

GPG performs its work in the directory from which it is invoked.

eg.

Here is current directory:

$ cd
T:\Test

Here is directory listing:

$ dir /s /b
T:\Test\bar
T:\Test\foo
T:\Test\bar\foobar.txt.asc

Decrypt the file:

$ gpg --use-embedded-filename t:\test\bar\foobar.txt.asc
gpg: 3DES encrypted data
gpg: encrypted with 1 passphrase
gpg: WARNING: message was not integrity protected

Directory listing - Notice decrypted file is in the current directory:

$ dir /s /b
T:\Test\bar
T:\Test\foo
T:\Test\foobar.txt
T:\Test\bar\foobar.txt.asc

Change to a different directory and decrypt file:

$ cd foo

$ gpg --use-embedded-filename t:\test\bar\foobar.txt.asc
gpg: 3DES encrypted data
gpg: encrypted with 1 passphrase
gpg: WARNING: message was not integrity protected

Notice decrypted file is in the current directory:

$ dir /s /b
T:\Test\foo\foobar.txt
Post by l***@gmail.com
Run command "C:\Program Files\GNUGnuPG\gpg.exe" --passphrase
MyPassword --use-embedded-filename E:\Receive\TST\FileName.txt.gpg
decrypted file goes to "C:\Documents and Settings\All Users\Documents
\My Automate Tasks".
Why result is different? It should be the same... :(
Because you invoke GPG in the directory
"C:\Documents and Settings\All Users\Documents\My Automate Tasks"
--
OpenPGP: id=18795161E22D3905; preference=signencrypt;
url=http://guysalias.fateback.com/pgpkeys.txt
Loading...