{"id":245,"date":"2009-03-12T14:34:25","date_gmt":"2009-03-12T22:34:25","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=245"},"modified":"2009-03-12T14:34:25","modified_gmt":"2009-03-12T22:34:25","slug":"dos-tricks","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2009\/03\/12\/dos-tricks\/","title":{"rendered":"DOS tricks"},"content":{"rendered":"<p>Batch file tricks<\/p>\n<p>current directory of the batch file<br \/>\n%~dp0<br \/>\ncd \/d %~dp0<br \/>\nxcopy %~dp0\\*.* %~dp0\\%var%\\<\/p>\n<p>use pushd instead of CD for UNC directories<br \/>\nIf a network path is specified, PUSHD will create a temporary drive letter that points to that specified network resource and then change the current drive and directory, using the newly defined drive letter. Temporary drive letters are allocated from Z: on down, using the first unused drive letter found.<br \/>\nuse %:~n,1% and %:~n,-1% to scan a string and remove heading and trailing blanks<\/p>\n<p>pushd %~dp0<br \/>\npushd &#8220;%~dp0:~n,-1%\\SubDirectoryName&#8221;<\/p>\n<p>%USERNAME%<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Batch file tricks current directory of the batch file %~dp0 cd \/d %~dp0 xcopy %~dp0\\*.* %~dp0\\%var%\\ use pushd instead of CD for UNC directories If a network path is specified, PUSHD will create a temporary drive letter that points to that specified network resource and then change the current drive and directory, using the newly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-software"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}