Convert HTML files from U-UNIX to DOS

Convert HTML files from U-UNIX to DOS

1
NewbieNewbie
1

    Mar 17, 2007#1

    I am running under windows vista business edition

    I have a frequently repeated operation that I want to automate. Ideally, the script would do all of the following:

    1) Open all the .html files from my c:/TEMP folder (circa 20 files) - a workaround would be to drag and drop files into uedit

    2) Convert all the open files to DOS files (without having to answer the nags)

    3) Convert all the open files from unicode to ASCII - I see only how to do this with one click per file

    4) Save all the newly converted files on top of the originals(without having to answer the nags) - close all would seem to do this, somehow I am finding that the changes are not being saved

    Any help would be appreciated

    6,675585
    Grand MasterGrand Master
    6,675585

      Mar 17, 2007#2

      Create a macro with following code:

      Loop
      IfNameIs ""
      ExitLoop
      EndIf
      UnicodeToASCII
      UnixMacToDos
      CloseFile Save
      EndLoop

      Save this macro into a macro file. Use following on the command line for example in a shortcut:

      "C:\Program Files\UltraEdit\uedit32.exe" C:\Temp\*.html /M,E="full path of macro file"

      That should start UltraEdit, open all HTML files in C:\Temp\ and run the macro which converts every file from UNICODE to ASCII and from UNIX/MAC to DOS and before it is saved and closed until no file is open anymore and the macro and then UltraEdit exits.

      You should have never a HTML file in C:\Temp\ which is not a U-UNIX (Unicode file with Unix line terminations) when running this macro because the file content will be horrible destroyed.
      Best regards from an UC/UE/UES for Windows user from Austria