{"id":15580,"date":"2021-12-19T14:36:59","date_gmt":"2021-12-19T14:36:59","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=15580"},"modified":"2021-12-19T14:38:25","modified_gmt":"2021-12-19T14:38:25","slug":"solved-i-want-to-zip-the-files-using-vbs-script","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/i-want-to-zip-the-files-using-vbs-script\/29170.html","title":{"rendered":"Solved I Want To Zip The Files Using Vbs Script"},"content":{"rendered":"<p>Can onyone please help me to zip the files using VB script ?<\/p>\n<p>My requirement is like:<\/p>\n<p>There will be two files in the folder C:\\Users\\MEDICARE\\<br \/>\nFile1 = MEDICARE_%CCYY%%MM%%DD%_CHANGE.txt<br \/>\nFIle2 = MEDICARE_%CCYY%%MM%%DD%_FULL.txt<\/p>\n<p>CCYY = Current year like 2013<br \/>\nMM = Current month like 06<br \/>\nDD = Current date like 05<\/p>\n<p>The above files come to this folder C:\\Users\\MEDICARE\\ with current date.<\/p>\n<p>The above files will not be there in the folder togethter. Some times MEDICARE_%CCYY%%MM%%DD%_CHANGE.txt will be there or some times MEDICARE_%CCYY%%MM%%DD%_FULL.txt<\/p>\n<p>So we need to have if condition here, Whichever file is availbe we need to ZIP that file.<\/p>\n<p>For eg..<\/p>\n<p>If MEDICARE_%CCYY%%MM%%DD%_CHANGE.txt is availbe in C:\\Users\\MEDICARE\\<br \/>\nThen we need to zip the file like C:\\Users\\MEDICARE\\MEDICARE_%CCYY%%MM%%DD%_CHANGE.zip<\/p>\n<p>If MEDICARE_%CCYY%%MM%%DD%_FULL.txt is availbe in C:\\Users\\MEDICARE\\<br \/>\nThen we need to zip the file like C:\\Users\\MEDICARE\\MEDICARE_%CCYY%%MM%%DD%_FULL.zip<\/p>\n<p>Please help me to get this done in VB script<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":66},"question-category":[55],"question_tags":[],"class_list":["post-15580","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\/15580","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=15580"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=15580"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=15580"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=15580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}