Fog Creek Software
Discussion Board

Opening a file and saving it with WordPad

I would like to do the following thing

Open a file with wordpad

like this:


and then automatically SAVE it again

Is there a nice & easy way to automate this ?

I need to do that because I've got some corrupt file
I need to integrate.

When I save them under wordpad my import process can import them.

Worpad might add a Line Feed or a Carriage Return Line Feed in the files (which I think fix my problem)

The problem occured because the file where downloaded via FTP using Binary instead of ASCII I think

Thursday, June 19, 2003

Why not just add the CRLF yourself?

Thursday, June 19, 2003

Didn't MS give out the source for WordPad sometime ago as a sample (possibly still or their site)? Could you hack the sample code (check the license terms too!)

S. Tanna
Thursday, June 19, 2003

Would it perhaps pay to look at your import process to work out why it is breaking?

Otherwise you could look into learning a scripting language to automate such a task (a script to open a bunch of files and append a \n should take a matter of minutes to write).

Rhys Keepence
Thursday, June 19, 2003

I'm not sure if it's the best way, but you could quickly set up a WinBatch script to do this for you.

Friday, June 20, 2003

Friday, June 20, 2003

*  Recent Topics

*  Fog Creek Home