Vbs script deletes the same row

Source: Internet
Author: User

The vbs script deletes a file in a row. You only need to drag the file into it and save the file as the original file with _ out

'Description: directly to be filtered files of the same line dragged to this vbs file <br/>' Author: sysdzw <br/> 'mailbox: sysdzw@163.com <br/>' QQ: 171977759 <br/> '12: 51 2009-7-12 <br/> dim strfilesource, strfileresult, t1 </P> <p> on error resume next <br/> strfilesource = wscript. arguments (0) <br/> strfileresult = left (strfilesource, limit Rev (strfilesource ,". ")-1) &" _out.txt "</P> <p> If strfilesource <>" "Then <br/> T1 = Time () <br/> set FSO = Createobject ("scripting. fil Esystemobject ") <br/> set stream = FSO. opentextfile (strfilesource, 1, false) <br/> set stream2 = FSO. opentextfile (strfileresult, 2, true) </P> <p> set dict = Createobject ("scripting. dictionary ") </P> <p> while not stream. atendofstream <br/> line = stream. readline <br/> if not dict. exists (line) Then <br/> call dict. add (line, null) <br/> call stream2.writeline (line) <br/> end if <br/> Wend </P> <p> stream. Close <br/> stream2.close <br/> msgbox "processed! Total time consumed "& datediff (" S ", T1, time) &" seconds. "& Vbcrlf & strfileresult, vbinformation," del same line QQ: 171977759 "<br/> else <br/> msgbox" no file! ", Vbexclamation," del same line QQ: 171977759 "<br/> end if

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.