查找命令错误“查找未识别为内部或外部命令

时间:2018-08-03 05:33:50

标签: batch-file

我正在使用Windows 10 我有一个.bat文件来合并位于多个文件夹中的多个.pxf文件。 直到3天之前,它都可以正常工作。 自最近三天以来,我在批处理文件中使用的FIND命令出现错误。

我的批处理文件如下

REM @Echo Off
SET PATH=%PATH%;C:\Program Files\7-Zip;
@For /F "tokens=1,2,3 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
Set All=%%A%%B%%C
)

SET /P Date=Please enter Date [dd-mm-yyyy]: 
IF "%Date%"=="" GOTO Error
   ECHO Hello %Date%, Welcome to V V C C CTS !
GOTO End
:Error
    ECHO You did not enter Proper DATE! Bye Bye!!
:End

cd "%Date%"
REM CD NON-CTS
7z e *.zip

7z x *.zip

Echo off

Pushd "%~dp1"
Type Nul >%All%.PXF
for /F "delims=" %%f in (
  ' Dir /B/S/A-D *.PXF ^|find /v /i "%All%.PXF" '
) do type "%%f" >> "%All%".PXF

MD D:\CTS\"%All%"

REM @Echo off

Pushd "%~dp1"
REM Type Nul >%All%.PXF
for /F "delims=" %%f in (
  ' Dir /B/S/A-D *.BR ^|find /v /i "*.BR" '
) do copy "%%f"  D:\CTS\"%All%"\*.*

for /F "delims=" %%f in (
  ' Dir /B/S/A-D *.BF ^|find /v /i "*.BF" '
) do copy "%%f"  D:\CTS\"%All%"\*.*

for /F "delims=" %%f in (
  ' Dir /B/S/A-D *.GF ^|find /v /i "*.GF" '
) do copy "%%f"  D:\CTS\"%All%"\*.*

0 个答案:

没有答案