{"id":12821,"date":"2021-12-10T06:23:46","date_gmt":"2021-12-10T06:23:46","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=12821"},"modified":"2021-12-10T06:24:29","modified_gmt":"2021-12-10T06:24:29","slug":"batch-file-input-numbers-only","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-input-numbers-only\/25147.html","title":{"rendered":"Batch File Input Numbers Only"},"content":{"rendered":"<p>i had a batch file that need to input month, day and year my problem is<\/p>\n<p>1.when i input letters still it will accept<br \/>\n2. when i input space still it will accept<\/p>\n<p>please help me to put a restriction that will not accept letters and spaces i need your expertise.<\/p>\n<p>SET \/P deyt1=Type the Month ^&lt;MM^&gt; :<br \/>\nif not &#8220;%deyt1:~2%&#8221;==&#8221;&#8221; (<br \/>\necho. ERROR: Name cannot be more than 2 chars<br \/>\ngoto START<br \/>\n)<br \/>\nIF NOT DEFINED deyt1 goto START<\/p>\n<p>SET \/P deyt2=Type the Day ^&lt;DD^&gt; :<br \/>\nif not &#8220;%deyt2:~2%&#8221;==&#8221;&#8221; (<br \/>\necho. ERROR: Name cannot be more than 2 chars<br \/>\ngoto START<br \/>\n)<br \/>\nIF NOT DEFINED deyt2 goto START<\/p>\n<p>SET \/P deyt3=Type the Year ^&lt;YYYY^&gt;:<br \/>\nif not &#8220;%deyt3:~4%&#8221;==&#8221;&#8221; (<br \/>\necho. ERROR: Name cannot be more than 4 chars<br \/>\ngoto START<br \/>\n)<br \/>\nIF NOT DEFINED deyt3 goto START<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":2},"question-category":[55],"question_tags":[],"class_list":["post-12821","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/12821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=12821"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=12821"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=12821"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=12821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}