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,975 Postings in 11,969 Threads, 349 registered users, 30 users online (1 registered, 29 guests)
Index | Admin contact |   Forum Time: May 26, 2020 - 7:02 pm EDT  |  Hits:31,237,328  (6,045 Today )
RSS Feed