Microsoft
Software
Hardware
Network
Question : Batch File Check For Numeric Digits
Hi,
So here's the situation, I need to create a batch file that will look at a text file in the same directory - if the text file has no numbers in it - it will skip the section and move to the next step. If there are numbers than it should execute a command and then move to the next step.
The text files will always be a constant name, I will be creating multiple for different reports.
Any thoughts or programs that I can use to do this?
Thanks,
Ryan
Answer : Batch File Check For Numeric Digits
@echo off
findstr /R /C:"[0-9]" test.txt > NUL
if "%ERRORLEVEL%"=="1" goto nonumbers
echo Found Numbers
goto end
:nonumbers
echo No numbers
:end
Random Solutions
How do I make a database that stores data from a form with sections that have an unknown number of entries
Can you setup Remote Desktop Gateway and Remote Desktop Services on the same Server
Operation Must Use an Updateable Query
Clearing a submit form once submitted
Crystal reports how to insert page break dynamically
JavaScript Error in IE7 menu hover background does not work
CentOS 5.3: install: booting off USB: misunderstanding....is there a way I can INSTALL linux from an USB drive?
Running Access VBA on Open Office Base
problem exportting gridview to excel spreadsheet
Enhancing a hotspot button to include reply with history