{"id":8163,"date":"2021-11-26T13:20:53","date_gmt":"2021-11-26T13:20:53","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=8163"},"modified":"2021-11-26T13:25:01","modified_gmt":"2021-11-26T13:25:01","slug":"i-m-using-xcopy-cmd-in-vba-i-have-to-check-it-copied-properl","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/i-m-using-xcopy-cmd-in-vba-i-have-to-check-it-copied-properl\/29465.html","title":{"rendered":"I M Using Xcopy Cmd In Vba I Have To Check It Copied Properl"},"content":{"rendered":"<p>how to check whether the xcopy command copied all the files or any error occured.Please help me it wouble be appreciated<\/p>\n<p>i am using writeline function to write content in the bat file. can you please help me how do i use this here is my code<br \/>\ndim retval<br \/>\nfor i=2 to 5<br \/>\nfilepath = &#8220;C:\\Windows\\336.bat&#8221;<br \/>\nfile.WriteLine &#8220;MkDir &#8221; &amp; folder<br \/>\nfile.WriteLine &#8220;XCOPY &#8221; &amp; path &amp; &#8221; &#8221; &amp; folder &amp; &#8221; \/SEY&#8221;<br \/>\nnext<br \/>\nretval=shell(filepath)<br \/>\ni want to get the status of each copy statement<br \/>\nI dont know how to use the variable Errorlevel it shows some Type mismatch error<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":3},"question-category":[55],"question_tags":[],"class_list":["post-8163","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\/8163","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=8163"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=8163"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=8163"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=8163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}