Computer Hope

Microsoft => Microsoft DOS => Topic started by: KenL on March 28, 2008, 01:48:33 PM

Title: Fixed Length and Variable Lengthing a file?
Post by: KenL on March 28, 2008, 01:48:33 PM
Hopefully someone can help

I had a program that no longer works (unfortunately I do not have the source), it was passed on to me my someone 5 years ago.

The program can do the following:

1) Make a file Fixed Length if I pass it a size option. As in I have a log file and I want to pad it to 132 characters to be able to read it into an application.

2) Make a file variable length. I generate a script file from an application that I want to be stripped of all trailing spaces before I submit it.

Anyone got any ideas for this? I would really love to make this out of basic DOS script.

I really do NOT want a VB script or anything else that requires a compiler. I have these written for a UNIX platform and until now I thought I had a something to work on Windows....but Since I upgraded to x64, it no longer works. I have tried using the windows AWK tool, but there isn't a lot of samples out there to make it work in windows.

Ken