Hi,
I am trying to convert about a few hundred txt files in PC format to UNIX format using Textpad (of the same filename). Is there anyway i can use the "Save As" function in Textpad to save multiple files into a different format without having to convert the files individually?? Thanks
Kevin
How to save multiple files at the same time
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Andreas
Re: How to save multiple files at the same time
I'd do it without Textpad - as I only need Unix formatted files on Unix.
I'd simply set the ftp to Ascii before transmitting the files.
I'd simply set the ftp to Ascii before transmitting the files.
-
Kevin
Re: How to save multiple files at the same time
Hi,
thanks for the suggestion but i found out that i have more than 2000 files to convert (not in any particular order) and the dos2unix tool that i downloaded also only allow me to convert 1 file at a time as it doesn't allow for wildcard entry (*.txt) for conversion. Is there any other tool that allows me to convert multiple files then? Or do i have to design a script that uses this program to convert one file at a time.
Thanks.
thanks for the suggestion but i found out that i have more than 2000 files to convert (not in any particular order) and the dos2unix tool that i downloaded also only allow me to convert 1 file at a time as it doesn't allow for wildcard entry (*.txt) for conversion. Is there any other tool that allows me to convert multiple files then? Or do i have to design a script that uses this program to convert one file at a time.
Thanks.
-
Andreas
Re: How to save multiple files at the same time
Create a list of all the files involved in Textpad
(e.g. open them all, then go to Edit/Copy Other/All file names)
Now paste the filenames into a new file.
Replace
^.
by
dos2html &
save the file as convert.bat
run the bat in a dos box
(e.g. open them all, then go to Edit/Copy Other/All file names)
Now paste the filenames into a new file.
Replace
^.
by
dos2html &
save the file as convert.bat
run the bat in a dos box
-
Jan Paul
Re: How to save multiple files at the same time
The dos2unix does support wildcards (I us them all the time), so dos2unix.exe *.txt must work.
If this does not work you can use the for statement:
for %a in (*.txt) do dos2unix.exe %a
If this fails, you can also use the dir /b statement:
dir /b *.txt > file.bat
Open this file in Textpad.
Replace all file endings "\n" with "\ndos2unix "
I never figured out how to replace the first entry also and to not replace the last entry in the file, so after the replace you then must manually edit the first and last statement.
Run the batch file.
Hope this helps.
Jan Paul
If this does not work you can use the for statement:
for %a in (*.txt) do dos2unix.exe %a
If this fails, you can also use the dir /b statement:
dir /b *.txt > file.bat
Open this file in Textpad.
Replace all file endings "\n" with "\ndos2unix "
I never figured out how to replace the first entry also and to not replace the last entry in the file, so after the replace you then must manually edit the first and last statement.
Run the batch file.
Hope this helps.
Jan Paul
-
Jan Paul
Re: How to save multiple files at the same time
Do you have looked at the add-on section of this site under "Convert".
These utiltites does work great and support wildcards.
Jan Paul
These utiltites does work great and support wildcards.
Jan Paul
-
Rich
Re: How to save multiple files at the same time
Older version of dos2unix didn't allow globbing (wildcards), but later version do. If you can't find a newer version, use the FOR statement.
Rich
Rich