Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PGP command Invalid 1

Status
Not open for further replies.

trudye10

Programmer
Sep 8, 2006
67
The last time I logged into this Forum I had a DOS/Batch command Filename Date problem. This time my DOS/Batch command problem is with the PGP command. The msg I am recieving is: PGP is not recognized as an internal or external command.
Here is my code:

Code:
REM					Import File
"C:\Program Files\Ipswitch\ftpscrpt" -f S:\ops\scripts\Unscmble_Kav.scp
timeout 15

set GE_POS_SALE=%1
set MM=%date:~4,2%
set DD=%date:~7,2%
set YYYY=%date:~10,4%
set TIMESTAMP=%MM%%DD%%YYYY%
for /f "delims=." %%a in ("%Geposdel.TXT%") do set NEWNAME=%%a.%TIMESTAMP%.%%b

REN S:\ops\data\GE_POS_SALE%TIMESTAMP% GE_POS_SALE.txt

REM					UnEncryption Key
pgp -o U:\ops\data\GE_POS_SALE.txt GE_POS_SALE2.TXT -z johns

I know that DOS is trying to tell me the syntax is incorrect but I'm not sure what exactly is wrong. Any assistance would be appreciated.

Thanx,
Trudye
 
Put the full path to pgp?

Matt

Please always take the time to backup important data and verify that backup, before making any changes suggested.
 
Its trying to tell you it doesn't know what pgp is. As was said put the full path to pgp, as I'm pretty sure its not a command that's naturally available in windows.


Code:
[red]C:\path\to\pgpexe\[/red]pgp -o U:\ops\data\GE_POS_SALE.txt GE_POS_SALE2.TXT -z johns

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Okay, now you have me confused. Are you asking for help because Windows does not recognize your pgp program, or do you simply not know what PGP is?

I'm not insulting you at all, I'm just not sure if you're throwing a batch file out that you have no clue what it does, or if you know what the batch file does, your OS simply won't process one line of it.

Matt

Please always take the time to backup important data and verify that backup, before making any changes suggested.
 
I'm not the OP. I was telling the Op. that windows is complaining because it doesn't know what pgp is, and that he should add the full path to it.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Oops. My bad. I was up late last night.

: insert red face here :

Matt

Please always take the time to backup important data and verify that backup, before making any changes suggested.
 
HI Guys, thank you so much for the overwhelming response. I followed the suggestion and received the following msg:

'C:\Program' is not recognized as a internal or external command operable program or batch file.

I verfied that there is a PGP.EXE file on that path. So I did a CD\ & changed directories before the call to the exe. It worked, it found it but it couldn't find the file I was decrypting which in on path E:/ops/data..... (DUH!)
So I included the path of the file 'zGE_POS_SALE_ten.txt'. It still did not find it, because I had already changed paths. AnyWho here is the code I finally submitted.

Code:
REN S:\ops\data\GE_POS_SALE%TIMESTAMP% GE_POS_SALE.txt

REM                    UnEncryption Key
CD C:\Program Files\NetAssoc\PGPNT
pgp -o E:\ops\data\zGE_POS_SALE_ten.txt E_POS_SALE_ten.txt -z johnston

OBTW: I changed t filename so as not to confuse it with production.

Thanx again,
Trudye
 

Does pgp have a file extension? .exe maybe?

Try typing it last part like this:

REM UnEncryption Key
C:\Program Files\NetAssoc\PGPNT\pgp -o E:\ops\data\zGE_POS_SALE_ten.txt E_POS_SALE_ten.txt -z johnston
 
Command prompt doesn't like spaces change Program Files to its 8.3 name. progra~1. like this:

Code:
CD C:\Progra~1\NetAssoc\PGPNT

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
vacunita you are correct. I completely overlooked that. Good catch. You can type it in as vacunita said or you can put it in quotes.
 
Hi Guys, sorry it took me soooo long to get back to you. The system is not having a problem finding the PGNT pgm, its finding that just fine (after Vacunita's suggestion).

But once he finds the PGNT pgm the directory is different and he can't find E:\operations\datafiles\GEPOS\FTPIN\GE_POS_SALE*.pgp.

Or, maybe it's not a directory change problem (now that I'm thinking about it). Do you think it might have something to do with the Wildcard at the end of the filename. I'll try and replace the wildcard with the TIMESTAMP variable and see what happens.

Thanx again,
I'll keep you posted,
Trudye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top