Mã sau không cập nhật Chạy bằng N ngay cả khi kết quả trùng khớp xảy ra. điều này có nghĩa là tôi không rơi vào mã CALL. Am i thiếu cái gì ở đây?tệp lô không thể đặt biến trong mệnh đề IF
SET Run=Y
REM Check current files date/time information and establish if the file has been present too long in the directory
REM Skip first 4 lines as header information not required
FOR /f "tokens=1-5 skip=4 delims= " %%G IN ('dir /OD "%SRCH_CRITERIA% "') DO (
ECHO "Params to processFile: " %%G %%H %%I ""%%K""
IF %%K.==. (
ECHO "K:nothing"
SET Run=N
ECHO %Run%
)
IF %%K==free (
ECHO "K:FREE"
SET Run=N
ECHO %Run%
)
ECHO %Run% RUN
IF %Run%=="Y" (
CALL :processFile "%%G" "%%H" "%%I" "%%K"
)
)
Cảm ơn paxdiablo, đã phân loại hoàn toàn vấn đề của tôi – sapatos