Computing.Net > Forums > Programming > Batch File: error with piping+FIND

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch File: error with piping+FIND

Reply to Message Icon

Name: randomn00b
Date: May 26, 2008 at 23:25:54 Pacific
OS: Windows XP
CPU/Ram: ?
Product: ?
Comment:

set rems=!rems!
set count=0
FOR /F "tokens=1,2* delims=^" %%a IN (%remfp%) DO (
set /a count=!count!+1
echo count=!count!
echo %rems% | FIND "!count!"
IF %ERRORLEVEL% LSS 1 (echo %%a)
)

INFO:
%rems% is a variable containing signle-digit integers in ascending order

%remfp% is a valid file path containing:

'string'^mm/dd/yyyy

Problem:
No matter if !count! exists in %rems% or not, FIND is not able to "see" it. If you need clarification, please ask.



Sponsored Link
Ads by Google

Response Number 1
Name: randomn00b
Date: May 26, 2008 at 23:28:29 Pacific
Reply:

***Problem Solved***
Never mind. I realized just after posting that I needed to write !errorlevel! instead of %errorlevel%


0
Reply to Message Icon

Related Posts

See More


Programming Startup c++ - path question



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch File: error with piping+FIND

Batch file - reporting HDD space www.computing.net/answers/programming/batch-file-reporting-hdd-space/15057.html

Batch File Creation with MD www.computing.net/answers/programming/batch-file-creation-with-md/11547.html

Batch file for renaming folders www.computing.net/answers/programming/batch-file-for-renaming-folders/15430.html