Can textpad automatically save opened files in PC format?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Svein
Posts: 4
Joined: Fri Oct 22, 2004 2:19 pm
Location: Norway

Can textpad automatically save opened files in PC format?

Post by Svein »

:?
I am exchanging text files that I want to load into a system reading these files. But the files I receive has not got the necessary CRLF. Opening the files and saving them in PC format solves the problem, but is time consuming.

Is it possible to make textpad save as PC format as default?

Many thanks,

Svein
helios
Posts: 716
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

Post by helios »

You will need to implement the following procedure in TextPad:

From the Configure menu choose:

1. Preferences
2. "+" sign next to Document classes
3. Click on Default
4. Under Document class options, check "Create new files as" PC
5. Check "Apply these settings to all document classes"
6. Click Apply/OK.

I hope this helps.
Helios Software Solutions
Svein
Posts: 4
Joined: Fri Oct 22, 2004 2:19 pm
Location: Norway

Post by Svein »

:cry:
I have just tried, but my files are not new. they are opened from my hard drive. and default format for saving is "no change".

Any other suggestions?

Svein
Lostclown
Posts: 8
Joined: Fri Oct 15, 2004 1:12 pm
Location: Iceland

Post by Lostclown »

One way would be to make a macro that saves the current file in the correct format and then goes to the next file (with Ctrl-Tab). Then open all the files and run the macro with "Multi-play" the same number of times as the number of files. I recommend turning "View Document Selector" on when running a macro like that so you can watch the progress of the macro running through your documents.

The alternative is to use a unix2dos command line utility.
A pc version can be found here http://www.bastet.com/software/software.html

Lostclown
Svein
Posts: 4
Joined: Fri Oct 22, 2004 2:19 pm
Location: Norway

Post by Svein »

:D
Thank you.

I will try this

Svein
Svein
Posts: 4
Joined: Fri Oct 22, 2004 2:19 pm
Location: Norway

Still no easy way to convert my files to PC format (CRLF)

Post by Svein »

I tried to make a macro and it seemed to work, except that it saved the files with the same file name every time it repeated itself.
Can I create the macro in another way, so that each file will keep its filename?

I also had a look at the unix2dos program. I haven't tried it yet, but it seems to convert only one file at a time. My problem is that I have several. Maybe a few hundred at a time. Do someone have experience with the unix2dos conversion program?

Best regards,

svein
bveldkamp

Post by bveldkamp »

Well, if it only takes one file at a time, you can always write a batch file containing sth. like:

Code: Select all

@echo off
REM convert all text files to DOS format
for %%f in (*.txt) do unix2dos %%f
Post Reply