How to sort a txt file and output to new file

How to sort a txt file and output to new file

2

    Sep 07, 2005#1

    I am trying to input a 40 million row text file, sort it and output to a new file. I have successfully written a macro to sort a file and save it to itself. I am using a bat file to run. Below is the code I have but I don't know how to get it to save to new file in order to preserve the original in case something happens.

    InsertMode
    ColumnModeOff
    HexOff
    UnixReOff
    SortAsc 47 78 235 242 1 42 43 46
    SaveAs "D:\HNDATA\CRMSdata\iservice50"

    6,675585
    Grand MasterGrand Master
    6,675585

      Sep 07, 2005#2

      If you run the macro with a bat file, why do you not simply copy your file first with command copy your_original.txt copy_of_original.txt inside the batch file and then run the UltraEdit macro on the copy.
      Best regards from an UC/UE/UES for Windows user from Austria

      2

        Sep 07, 2005#3

        Thanks.
        Is there any limitations as far as ultraedit is concerned as to how many records can be sorted?

        6,675585
        Grand MasterGrand Master
        6,675585

          Sep 08, 2005#4

          According to help of UltraEdit, there is no special limit for sort. But for your extremly big file it will take a very long time. Best run the sort at night.
          Best regards from an UC/UE/UES for Windows user from Austria