views:

59

answers:

1

Hello All,

First of all I am very thankful to the owner of this website. I have learned and implement various technologies with the help of solutions provided by the readers.

I know the question I asked is posted many time in this forum. And I have tired all of the solutions available, but no luck I may case I am trying to read a dat file which is basically a msg/feed file having more than 22000 Characters. Every line may or may not be of same length. My requirement is to convert the file to fixed line length character file. I have a logic that work well using vb script, however its pretty slow. I have checked with For f/ but no luck. The only delimiter I have is EOT, which i can see in Textpad but not in notepad. I have tried with \n, token=. Please help me in resolving the issue. Regards, Rajiv [email protected]

A: 

If VBScript was too slow, then a batch file will be even slower. What cmd is good at is running programs; as a programming environment – not so much. And string manipulation is certainly not its strong point (I have yet to learn whether you can actually manipulate arbitrary strings).

That being said, look at your algorithm, profile it, find out what makes it slow. Chances are that re-implementing it in another language won't make it much faster.

Joey