sparker
sparker

Reputation: 1578

The system cannot find the path specified - Batch file

I was using the below batch script to search the list of IDs(in a text file) in multiple text files. It was working fine. But today I am getting the Error The system cannot find the path specified. when I run the same batch script. I cross verified the paths and paths are corerect. Can anyone help me to fix this.

Batch Script I used

@echo off
setlocal enableextensions disabledelayedexpansion

set "manifest_folder=\\vfiler-padhu\padhu\*.txt"
set "file_list=\\vfiler-padhu\padh\File_list.txt"
set "tmpFile=\\vfiler-padhu\padh\tmpFile.txt"

    (for /f "usebackq delims=" %%a in ("%file_list%") do (
        set "found="
        for /f "delims=" %%b in ('findstr /l /m /c:"%%a" "%manifest_folder%"') do (
            echo %%a is found in %%~nxb
            set "found=1"
        )
        if not defined found (
            echo %%a is not found
        )
    )) > "%outputFile%"

Thanks in advance

Upvotes: 1

Views: 2663

Answers (1)

Magoo
Magoo

Reputation: 79982

outputFile is not defined; tmpFile is unused. Otherwise, seems fine.

Upvotes: 2

Related Questions