{"id":11371,"date":"2021-12-08T03:12:40","date_gmt":"2021-12-08T03:12:40","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=11371"},"modified":"2021-12-08T03:12:58","modified_gmt":"2021-12-08T03:12:58","slug":"solved-left-padding-in-dos-command","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/left-padding-in-dos-command\/29351.html","title":{"rendered":"Solved Left Padding In DOS Command"},"content":{"rendered":"<p>I have this simple script. It will create a new file contain 999-999.<br \/>\nIf user enter 99 it must show 099. How to use the left padding here?<\/p>\n<p>Thanks<\/p>\n<p>@echo off<br \/>\nSet \/P p_rr_fr= Please enter Running No From : || Set p_rr_fr=NothingChosen<br \/>\nIf &#8220;%p_rr_fr%&#8221;==&#8221;NothingChosen&#8221; goto :sub_error<\/p>\n<p>Set \/P p_rr_to= Please enter Running No To : || Set p_rr_to=NothingChosen<br \/>\nIf &#8220;%p_rr_to%&#8221;==&#8221;NothingChosen&#8221; goto :sub_error<\/p>\n<p>echo %p_rr_fr%-%p_rr_to%&gt;running_no.txt<\/p>\n<p>goto:eof<\/p>\n<p>:sub_error<br \/>\necho Please key in Running No<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":5},"question-category":[47],"question_tags":[],"class_list":["post-11371","question","type-question","status-publish","hentry","question-category-hardware"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/11371","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=11371"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=11371"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=11371"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=11371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}