{"id":8274,"date":"2021-11-28T02:29:39","date_gmt":"2021-11-28T02:29:39","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=8274"},"modified":"2021-11-28T02:30:06","modified_gmt":"2021-11-28T02:30:06","slug":"vbscript-to-read-text-line-in-a-file-into-a-variable","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/vbscript-to-read-text-line-in-a-file-into-a-variable\/31037.html","title":{"rendered":"Vbscript To Read Text Line In a File Into a Variable"},"content":{"rendered":"<p>HI, I&#8217;m embarrassed to admit that I&#8217;m stumped here. I need vbscript to read in the 2nd the last line in a file into a variable. The number of lines in the file is unpredictable and subject to change which makes it awkward. I have searched but couldn&#8217;t find anything. There is lots about batch files and the first line or the last line or a specific line number but of no help. I wouldn&#8217;t know the line number because of the varying number of lines and I need it to be vbscript. If anyone can give me a url or some lines of script I would be grateful.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":25},"question-category":[55],"question_tags":[],"class_list":["post-8274","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\/8274","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=8274"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=8274"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=8274"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=8274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}