Pipe Character

August 26, 2009 at 13:36:53
Specs: Windows XP
I get an error running this command in a DOS Prompt:

C:\>PATH | C:\WINDOWS\system32\find.exe ";;" 1>NUL
The system cannot find the path specified.

Please help...


See More: Pipe Character

Report •


#1
August 26, 2009 at 14:02:53
ask yourself what path has to do with pipe?

You do understand its only if c:\windows\system32 is not in the path [which it is] or you are trying to execute find for something that is not in the path do you have to specify path in the find statement.

You never specify path by "path" but by providing the path like c:\mymadeupfolder\filename


Report •

#2
August 26, 2009 at 14:12:54
Here is the full batch file which was written by MSC Software for the product Easy5. The startup shortcut for the program calls this out. The thing is this error is only happening one one system. This batch runs fine on all the other systems, so I was thinking that this system has something corrupt with recognizing simple batch commands. Do you agree?

@echo on
REM Creation Timestamp: 8-25-2009 16:20:49
REM
REM This batch file is used to set environment variables used by MSC.EASY5.
REM
REM Note: This file is automatically created and updated by the MSC.EASY5
REM Setup program. Any modifications made may therefore be lost.
REM
REM =======================================================================
REM
if "%1"=="" echo Initializing MSC.EASY5 Command Shell environment...
if "%1"=="-BATCH" echo Initializing MSC.EASY5 Command Shell environment...

set EZHOME=C:\engapps\MSC.Software\MSC.EASY5\2005
if not "%1"=="-GUI" goto NOGUI
echo Enter "easy5x -help" for a list of available MSC.EASY5 command-line options.
echo Enter "exit" to close this window.
echo.
goto END
echo ------------------------------------------------------------------------
:NOGUI
REM Set _Q variable to set OS-dependent white-spaced path handling
set _Q=

if not "%2"=="" TITLE MSC.EASY5 Command Shell %2
if "%EZ5_STARTUP_DIR%"=="" set EZ5_STARTUP_DIR=C:\EASY5data\default
set EZ5TOP=C:\engapps\MSC.Software\MSC.EASY5\2005
set EZLMDIR=C:\engapps\MSC.Software\MSC.EASY5\2005\lmgr
REM Set EZSHELL (shell invocation command)
set EZSHELL=C:\engapps\MSC.Software\MSC.EASY5\2005\Shell\sh.exe

REM Set license manager environment initialization flag
set INITLMV=
if "%1"=="-ERRWAIT" set INITLMV=INIT
if "%1"=="-QUIET" set INITLMV=INIT
if "%1"=="-BATCH" set INITLMV=INIT
if not "%INITLMV%"=="INIT" if not "%1"=="-GUI" goto SETENV

REM Save original environment (initialization pass only)
set oPATH=%_Q%%PATH%%_Q%
set oLIB=%LIB%
set oINCLUDE=%INCLUDE%

REM Set default compiler (per installation selection)
if "%EZ5_FORT_COMP%"=="" set EZ5_FORT_COMP=CVF

:SETENV
REM Reestablish environment from initialized environment (saved)
set PATH=%_Q%%oPATH%
set LIB=%oLIB%
set INCLUDE=%oINCLUDE%
REM Insert current local path in search path (if needed):
PATH | C:\WINDOWS\system32\find.exe ";;" > NUL
if ERRORLEVEL 1 set PATH=;;;%_Q%%PATH%%_Q%

REM Insert MATLAB dirpath of file mex.bat:
PATH | C:\WINDOWS\system32\find.exe /I "C:\Engapps\Matlab\R2008B\bin\win32" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\Engapps\Matlab\R2008B\bin\win32%_Q%;%_Q%%PATH%%_Q%

REM Setup environment for selected compiler
if "%EZ5_FORT_COMP%"=="GNU" goto SETUP_GNU
if "%EZ5_FORT_COMP%"=="IF8" goto SETUP_IF8
if "%EZ5_FORT_COMP%"=="CVF" goto SETUP_CVF

:SETUP_NONE
REM Disable use of compilers and Create Executable
set EZ5_NO_BUILD=true
set EZ5_NO_CC=true
set EZ_NO_LIBCHK=true
set WSLIBDIR=
goto SETUP_END

:SETUP_IF8
REM Intel Visual Fortran Compiler not Installed
REM To manually activate, disable the following 10 lines and follow instructions below:
echo ------------------------------------------------------------------------------
echo.
echo Warning - MSC.EASY5 is selected for use with Intel Visual Fortran 8.x but this
echo compiler has not yet been installed. Please: 1) install this compiler
echo software, then 2) either reinstall MSC.EASY5, manually edit batch file:
echo C:\engapps\MSC.Software\MSC.EASY5\2005\EZ5VARS.BAT
echo. or set environment variable EZ5_FORT_COMP to CVF or GNU.
echo ------------------------------------------------------------------------------
@echo 
PAUSE
REM Setup environment for Intel Visual Fortran 8.x compiler:
REM Include MSC.EASY5 IF8 library path (for library-specific DLL's):
REM PATH | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\easy5x\lib_nt_IF8" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\easy5x\lib_nt_IF8%_Q%;%_Q%%PATH%%_Q%
REM set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\easy5x\lib_nt_IF8%_Q%;%_Q%%PATH%%_Q%
REM Uncomment following lines and replace <FINTPATH> appropriately
REM PATH | C:\WINDOWS\system32\find.exe "<FINTPATH>" > NUL
REM if ERRORLEVEL 1 @call "<FINTPATH>" > NUL
REM set WSLIBDIR=lib_nt_IF8
REM set EZ5_NO_CC=
REM Uncomment following lines and replace <MSVC7PATH> appropriately
REM PATH | C:\WINDOWS\system32\find.exe "<MSVC7PATH>\Bin" > NUL
REM if ERRORLEVEL 1 if exist <MSVC7PATH>\Bin @call <MSVC7PATH>\Bin\vcvars32.bat > NUL
set EZ5_NO_BUILD=true
goto SETUP_END

:SETUP_CVF
REM Include MSC.EASY5 CVF library path
PATH | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\easy5x\lib_nt_DVF6" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\easy5x\lib_nt_DVF6%_Q%;%_Q%%PATH%%_Q%
REM Insert tool paths in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\Common\Tools\WINNT" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\Common\Tools\WINNT%_Q%;%_Q%%PATH%%_Q%
REM Insert CVF6 library manager executable in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\VC98\BIN" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\Program Files\Microsoft Visual Studio\VC98\BIN%_Q%;%_Q%%PATH%%_Q%
REM Insert CVF6 compiler executable path in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\DF98\BIN" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\Program Files\Microsoft Visual Studio\DF98\BIN%_Q%;%_Q%%PATH%%_Q%
C:\engapps\MSC.Software\MSC.EASY5\2005\Shell\which.exe df | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\DF98\BIN" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\Program Files\Microsoft Visual Studio\DF98\BIN%_Q%;%_Q%%PATH%%_Q%
REM Insert MS Developer Studio executable path in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\Common\Msdev98\BIN" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\Program Files\Microsoft Visual Studio\Common\Msdev98\BIN%_Q%;%_Q%%PATH%%_Q%
REM Insert CVF6 run-time library path in LIB:
echo %LIB% | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\VC98\LIB;C:\Program Files\Microsoft Visual Studio\DF98\LIB" > NUL
if ERRORLEVEL 1 set LIB=C:\Program Files\Microsoft Visual Studio\VC98\LIB;C:\Program Files\Microsoft Visual Studio\DF98\LIB;%LIB%
REM Insert CVF6 include file path:
echo %INCLUDE% | C:\WINDOWS\system32\find.exe /I "C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE;C:\Program Files\Microsoft Visual Studio\DF98\INCLUDE" > NUL
if ERRORLEVEL 1 set INCLUDE=C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE;C:\Program Files\Microsoft Visual Studio\DF98\INCLUDE;%INCLUDE%
REM Set CVF6 version flag:
set DVFVER=6.0
set WSLIBDIR=lib_nt_DVF6
set EZ5_NO_BUILD=
REM Add CVF-related environment variable (for FPE-handling)
set FOR_IGNORE_EXCEPTIONS=true
goto SETUP_END

:SETUP_GNU
REM GNU/GCC compiler suite not installed
REM Please disable the following 10 lines, and follow the instructions below:
echo ------------------------------------------------------------------------------
echo.
echo Warning - MSC.EASY5 is selected for use with the GNU/GCC compiler suite but this
echo compiler has not yet been installed. Please: 1) install this compiler
echo software, then 2) either reinstall MSC.EASY5, manually edit batch file:
echo C:\engapps\MSC.Software\MSC.EASY5\2005\EZ5VARS.BAT
echo. or set environment variable EZ5_FORT_COMP to CVF or IF8.
echo ------------------------------------------------------------------------------
@echo 
PAUSE
REM Uncomment the following 8 lines and set <GNUtop> to the GCC/GNU home directory:
REM Include MSC.EASY5 GNU library path
REM set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\easy5x\lib_nt_GNU%_Q%;%_Q%%PATH%%_Q%
REM set GCC_HOME=<GNUtop>
REM set PATH=%_Q%%GCC_HOME%\bin%_Q%;%_Q%%PATH%%_Q%
REM set GCC_EXEC_PREFIX=%GCC_HOME%\lib\gcc-lib\
set EZ5_NO_BUILD=true

:SETUP_END
REM Ensure that Windows folders are in path. If not, add them.
PATH | C:\WINDOWS\system32\find.exe /I "%WINDIR%" > NUL
if ERRORLEVEL 1 set PATH=%_Q%%PATH%%_Q%;C:\WINDOWS\system32;C:\WINDOWS

REM Insert MSC.EASY5 home path in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005;" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005%_Q%;%_Q%%PATH%%_Q%
REM Insert MSC.EASY5 Shell folder in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\Shell;" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\Shell%_Q%;%_Q%%PATH%%_Q%
REM Insert MSC.EASY5 Python folder in PATH:
PATH | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\python;" > NUL
if ERRORLEVEL 1 if exist "C:\engapps\MSC.Software\MSC.EASY5\2005\python\" set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\python%_Q%;%_Q%%PATH%%_Q%
REM Insert MSC.EASY5 System folder in PATH (should be first):
PATH | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\System;" > NUL
if ERRORLEVEL 1 set PATH=%_Q%C:\engapps\MSC.Software\MSC.EASY5\2005\System%_Q%;%_Q%%PATH%%_Q%

REM Insert MSC.EASY5 System folder in LIB:
echo %LIB% | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\System;" > NUL
if ERRORLEVEL 1 set LIB=C:\engapps\MSC.Software\MSC.EASY5\2005\System;%LIB%

REM Insert MSC.EASY5 extension folder(s) in LIB (as appropriate)
set EZXCDIR=C:\engapps\MSC.Software\MSC.EASY5\2005\xcomp
if not "%EASY5_XCOMP_DIR%"=="" set EZXCDIR=%EASY5_XCOMP_DIR%
echo %LIB% | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\xcomp\msc.adams" > NUL
if ERRORLEVEL 1 if exist "%EZXCDIR%\msc.adams\" set LIB=%LIB%;%EZXCDIR%\msc.adams
echo %LIB% | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\xcomp\adams" > NUL
if ERRORLEVEL 1 if exist "%EZXCDIR%\adams\" set LIB=%LIB%;%EZXCDIR%\adams
echo %LIB% | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\xcomp\dads" > NUL
if ERRORLEVEL 1 if exist "%EZXCDIR%\dads\" set LIB=%LIB%;%EZXCDIR%\dads
echo %LIB% | C:\WINDOWS\system32\find.exe /I "C:\engapps\MSC.Software\MSC.EASY5\2005\xcomp\gsds" > NUL
if ERRORLEVEL 1 if exist "%EZXCDIR%\gsds\" set LIB=%LIB%;%EZXCDIR%\gsds
set EZXCDIR=

set TEMP=.
REM Set MKS Korn-Shell environment variables
set TMPDIR=.
set ROOTDIR=C:/engapps/MSC.Software/MSC.EASY5/2005/Shell
set SHELL=C:/engapps/MSC.Software/MSC.EASY5/2005/Shell/sh.exe
if "%HOME%"=="" set HOME=C:/EASY5data
REM Following line is used to provide terse security info for "ls -l" command.
if "%TK_NTSECURITYINFO_SID_TERSE%"=="" set TK_NTSECURITYINFO_SID_TERSE=true
REM To disable security info with an "ls -l" command replace the preceding line with:
REM if "%TK_NTSECURITYINFO_OFF%"=="" set TK_NTSECURITYINFO_OFF=true

REM Disable interactive FLEXlm popup dialogs
set FLEXLM_BATCH=1
REM Set MSC.EASY5 license-related environment variables
if not exist C:\engapps\MSC.Software\MSC.EASY5\2005\lmgr\EZ5LMVARS.BAT goto NOLMBAT
call C:\engapps\MSC.Software\MSC.EASY5\2005\lmgr\EZ5LMVARS.BAT %INITLMV%
goto END

:NOLMBAT
echo.
echo Warning - Batch file EZ5LMVARS.BAT could not be found. This file must
echo be stored in folder:
echo.
echo %EZLMDIR%
echo.
echo MSC.EASY5 license-related environment variables cannot be set, so MSC.EASY5 may
echo not execute as a result. Trying default license path...
echo.
if "%MSC_LICENSE_FILE%"=="" set MSC_LICENSE_FILE=C:\engapps\MSC.Software\MSC.EASY5\2005\lmgr\license.dat
echo Please perform a License Update to correct this.

:ENDERR
@echo 
echo.
if "%1"=="-ERRWAIT" PAUSE

:END
set _Q=
set INITLMV=


Report •

#3
August 26, 2009 at 14:54:27
bump to top. I really need help.

Report •

Related Solutions

#4
August 26, 2009 at 15:44:14
REMark ........>>>((((((Ask Here))))))<<<

.


.

... Posting is provided "AS IS" with no warranties
http://img515.imageshack.us/img515/...
Grrrr... ....more


Report •

#5
August 26, 2009 at 15:45:48
Did you check to see if 'find.exe' is actually at 'C:\WINDOWS\system32\find.exe'.

Report •

#6
August 26, 2009 at 15:49:01
Yes, find.exe is in the c:\windows\system32 folder. That was the first thing I checked.

Any other suggestions?

I think something is corrupt in the registry.

What do you think?


Report •

#7
August 27, 2009 at 06:04:26
- How do you know this is where the script chokes?
- Is there a "c:\windows\system32" directory?
- Does "%systemroot%" == "C:\Windows"?
- What's in the PATH?
- Does it work if you replace "PATH" with "ECHO %PATH%"

case2k9: I think something is corrupt in the registry.
I doubt it. "simple" batch commands are handled by CMD itself. Now the file system . . . .


Report •

#8
August 27, 2009 at 10:37:29
I know that It chokes on the line because Echo On is set to see the error.

Yes, there is a "c:\windows\system32" directory.

Path = %IFORT_COMPILER11%lib\ia32;C:\Program Files\Intel\Compiler\11.0\066\fortran\mkl\ia32\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\Common\Msdev98\BIN;C:\Program Files\Microsoft Visual Studio\DF98\BIN;C:\Program Files\Microsoft Visual Studio\VC98\BIN;C:\Program Files\SAP\FrontEnd\sapgui\FILC\odbc;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;F:\ORACLE\ORA81\BIN;C:\SFU\common\;C:\Program Files\Hummingbird\Connectivity\9.00\Accessories\;C:\engapps\;%IFORT_COMPILER10%IA32\Lib;%IFORT_COMPILER10%EM64T\Lib

No , it still didn't work with "ECHO %PATH%"

We decided to re-image the system.

The vendor has no idea either why it doesn't work.

Thanks for all your help.


Report •

#9
August 27, 2009 at 10:56:47
We decided to re-image the system.
So it works now?

If not: Does the account this script runs from have the required permissions to locate & run c:\windows\system32\find.exe?


Report •

#10
August 27, 2009 at 16:41:55
Yes, after the re-image the batch file works and the program launches correctly.

Yes, the user account launching the batch file had local and domain admin rights.

Thank you everybody for your help.


Report •


Ask Question