ZTree.com  | ZEN  | About...  

 Index   Back

Do you need to check for integers only?   [Q]

By: Martijn Coppoolse   Homepage   Voorburg, NL  
Date: Aug 24,2017 at 04:45
In Response to: i think you misunderstood the problem, please try this thread (Ryan)

> i need to make sure if the target string is a number string, then i
> must avoid it but if the target string is a letter string, then i must
> pass it to the next batch line.
> i could not find how to handle this anywhere in the internet.

You need to work on you Google-fu, my friend...

I Googled "batch check if string is number", the first two hits give (at least) three different ways to check this.

Most promising seems to be this one; I haven’t tested it, but they claim to be able to discern integers (positive, negative and zero) and non-integers.
Batch File input validation - Make sure user entered an integer - Stack Overflow


Thread locked

Messages in this Thread

94,476 Postings in 11,922 Threads, 348 registered users, 10 users online (0 registered, 10 guests)
Index | Admin contact |   Forum Time: Oct 17, 2019 - 4:15 pm EDT  |  Hits:28,768,911  (3,340 Today )
RSS Feed