I had to comment out one line as we do not use WinXP:
REM ver | find "XP" > nul
That made it work. Thank you for your response Frederik Long!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Following is the text in the batch file:
@echo off
pushd "\\x.Corp\dfs\vpmoperations\import\custodians\clientname\app"
for /f "tokens=* delims= " %%A in ('dir *.pgp /tc /b ^| find "."') do (
call :decryptfiles %%A
)
popd
goto :eof
:decryptfiles
REM If running on XP go to decryptWinXP otherwise assume we are running on windows 7
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto decryptWinXP
"C:\Program Files (x86)\Network Associates\PGP\pgp.exe" +force "\x.corp\dfs\vpmoperations\import\custodians\clientname\app%1" -p -z "pwd"
:decryptWinXP
"c:\Progra~1\Network Associates\pgp\pgp.exe" +force "\x.corp\dfs\vpmoperations\import\custodians\clientname\app%1" -p -z "pwd"
goto :eof
I get "The system cannot find the path specified." although the file exists and has been decrypted. Any thoughts?
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
I had to comment out one line as we do not use WinXP:
REM ver | find "XP" > nul
That made it work. Thank you for your response Frederik Long!
You need to tell us which line generates the error message.
You also need to change this line
if %ERRORLEVEL% == 0 goto decryptWinXP
to
if %ERRORLEVEL%==0 goto decryptWinXP
or even better: replace
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto decryptWinXP
with
*ver | find "XP" > nul &&*goto decryptWinXP