| 1. |
Solve : What Command that promt to Fill In Text? |
|
Answer» Hi All, :startThanks dude, I appreaciate that.. I will try to use it.. e-BamThanks guys (BatchFileCommand).. Its working.. e-bamContinue from the last question. Now the situation is; You have 1 text file called “data.txt” in 1 folder named “SOURCE”. The data.txt has a numbers of characters as per below: Bam;060180;engineer John;050881;executive Salem;151281;hackers : : When you click the batch file, you will be asking to insert the invoice no. as per yesterday discussion. The question is, how to make output data.txt file as per below? Invoice No: 1234 Bam;060180;engineer John;050881;executive Salem;151281;hackers : : Please advice..So, you want it to display Quote Invoice Number:followed by the invoice number? Simple! Where it says Quote echo "%variable%" > some_filereplace that with Code: [Select]echo Invoice No: "%variable%" > some_file If you want it to display Invoice No at the begining, that gets a bit tricky...But it's still possible! Code: [Select]Echo Invoice No: "%variable%" > some_other_file type data.txt >> some_other_file type some_other_file > data.txt del some_other_file There, that will do it. Here is a step-by-step explanation of the script: 1. Sends "Invoice No: %variable%" to some_other_file which is important. 2. Sends the FULL contents of data.txt to the end of some_other_file. 3. Sends the full contents of some_other_file (part 1 + 2) to data.txt and overrides anything that was previously in data.txt 4. Deletes some_other_file. Understand? I've understand whats u means. Thanks a lot. BTW, yesterday I've BUILD up the command like this: Code: [Select]SET /P VARIABLE=Please Key In DD No. and NAME: ECHO "%VARIABLE%" > C:\HLA\PAGECOUNT\DDNO\DDNo.txt PAUSE REM --- Merge the DDNo.txt with Data file COPY "C:\HLA\PAGECOUNT\DDNO\DDNo.txt"+"C:\HLA\PAGECOUNT\PDFPROCESS\NGC_DAILY.txt" "C:\HLA\PAGECOUNT\PDFPROCESS\SUBMERGING\NGC_DAILY.txt I use MERGING command where, I create 1 file DDNo, then merge with the data text. Then its work. How bout if u want to insert the text line in the middle of data text? e-Bam |
|