Prev: additional functionality needed using IMAPI2 (burning CD/DVD)
Next: can't get OR operator between two strings to work
From: ekkehard.horner on 28 Apr 2010 14:38 balzer schrieb: [...] > No, does not work for me. I wasn't fully clear. The doc1.txt contain > vaste vbscript code, where these lines > > ReturnAPP_B ("a1.exe") > ReturnAPP_B ("a2.exe") > ... > are only the *part* of the full code, so this lines is inside a code, > not full content of doc1.txt. > > Instead, the doc2.txt contains only n lines like > > file1.exe > file2.exe > ... > and so on. > No other strings or code in doc2.txt, only this list. > Then my first script solves your problem, provided it's correct to replace the nth <whatever>.exe in doc1.txt with the nth occurrence (=line) of <newname>.exe in doc2.txt. But I suspect that you really need to specify a mapping between .exe names in doc2.txt - like absde.exe,file1.exe .... fhgfjfj.exe,files3.exe .... old254.exe,new254.exe
From: balzer on 28 Apr 2010 16:49 "ekkehard.horner" <ekkehard.horner(a)arcor.de> wrote in message news:4bd87f46$0$6761$9b4e6d93(a)newsspool3.arcor-online.net... > balzer schrieb: > [...] > > No, does not work for me. I wasn't fully clear. The doc1.txt contain > > vaste vbscript code, where these lines > > > > ReturnAPP_B ("a1.exe") > > ReturnAPP_B ("a2.exe") > > ... > > are only the *part* of the full code, so this lines is inside a code, > > not full content of doc1.txt. > > > > Instead, the doc2.txt contains only n lines like > > > > file1.exe > > file2.exe > > ... > > and so on. > > No other strings or code in doc2.txt, only this list. > > > Then my first script solves your problem, provided it's correct to replace > the nth <whatever>.exe in doc1.txt with the nth occurrence (=line) of > <newname>.exe in doc2.txt. > > But I suspect that you really need to specify a mapping between .exe > names in doc2.txt - like > > absde.exe,file1.exe > ... > fhgfjfj.exe,files3.exe > ... > old254.exe,new254.exe ---------- Then it will be easier manually to replace each of these 254 lines, one by one, via manual copy & paste method. VBScript does not help here.
From: ekkehard.horner on 28 Apr 2010 17:49
balzer schrieb: > "ekkehard.horner" <ekkehard.horner(a)arcor.de> wrote in message > news:4bd87f46$0$6761$9b4e6d93(a)newsspool3.arcor-online.net... >> balzer schrieb: >> [...] >>> No, does not work for me. I wasn't fully clear. The doc1.txt contain >>> vaste vbscript code, where these lines >>> >>> ReturnAPP_B ("a1.exe") >>> ReturnAPP_B ("a2.exe") >>> ... >>> are only the *part* of the full code, so this lines is inside a code, >>> not full content of doc1.txt. >>> >>> Instead, the doc2.txt contains only n lines like >>> >>> file1.exe >>> file2.exe >>> ... >>> and so on. >>> No other strings or code in doc2.txt, only this list. >>> >> Then my first script solves your problem, provided it's correct to replace >> the nth <whatever>.exe in doc1.txt with the nth occurrence (=line) of >> <newname>.exe in doc2.txt. >> >> But I suspect that you really need to specify a mapping between .exe >> names in doc2.txt - like >> >> absde.exe,file1.exe >> ... >> fhgfjfj.exe,files3.exe >> ... >> old254.exe,new254.exe > ---------- > > Then it will be easier manually to replace each of these 254 lines, one by > one, via manual copy & paste method. VBScript does not help here. > It may be easier for you, but not for a person willing/being able to specify a problem correctly and to get/learn the necessary VBScript knowledge/skills. So don't blame the programming language, just because you can't use it. |