Batch file to insert text line

Closed
Fedexal - Mar 4, 2010 at 09:06 PM
Richard.Williams Posts 25 Registration date Saturday November 7, 2009 Status Member Last seen July 18, 2012 - Mar 18, 2010 at 11:55 AM
Hello, I need to have a batch file insert this line "<INTU>BID3000> into a download QBO file downloaded from
my bank... It has to be inserted in a certain spot in the text. This will enable me to download and import my info into quickbooks and reconcile my checking account. it will look something like this:


<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0<SEVERITY>INFO</STATUS><DTSERVER>20100305025733<LANGUAGE>ENG</SONRS></SIGNONMSGSRSV1>


with the "<INTU>BID3000>" line going in the text file right after <LANGUAGE>ENG
I figure to use a wildcard to have it insert into any QBO file I download from the bank then into quickbooks
Maybe even set it to then execute the QBO file...???? Any Ideas???? Thanks
Related:

1 response

Richard.Williams Posts 25 Registration date Saturday November 7, 2009 Status Member Last seen July 18, 2012 14
Mar 18, 2010 at 11:55 AM
You want to insert "<INTU>BID3000>" after "<LANGUAGE>ENG" in file "C:/folder1/file.qbo" (assuming).

Try this script.

# Script QBO.txt
var str file, content
cat $file > $content
stringappender -c "^"<LANGUAGE>ENG^" "<INTU>BID3000>"  $content > null
echo $content > { echo $file }



Copy and paste above script in file "C:/Scripts/QBO.txt". This script is in biterscripting. Start biterscripting and enter this command.


script "C:/Scripts/QBO.txt" file("C:/folder1/file.qbo")



That will do the necessary change in file "C:/folder1/file.qbo". If you need to do this in multiple qbo files, you can create a file loop.
1