Macro to save file as CurrentFilename+different extension

Macro to save file as CurrentFilename+different extension

2
NewbieNewbie
2

    Nov 17, 2007#1

    I have a macro that changes a pipe delimited file into a csv file with text qualifiers. This works great, but it would be nice if I could also have it save the file with a .csv extension.
    So for example it save myfile.txt as myfile.csv. is this possible in ultraedit?
    Thanks in advance.

    262
    MasterMaster
    262

      Re: Macro to save file as CurrentFilename+different extensio

      Nov 17, 2007#2

      Add this towards the end of your macro:

      CopyFilePath
      Top
      Paste
      Key BACKSPACE
      Key BACKSPACE
      Key BACKSPACE
      "csv"
      SelectToTop
      Cut
      SaveAs "^c"


      Caution: It expects your file has a 3 letter extension like "txt".

      2
      NewbieNewbie
      2

        Re: Macro to save file as CurrentFilename+different extensio

        Nov 17, 2007#3

        awesome... I'm glad my company uses UEdit... talk about time savings... This takes at least a minute per file to do without automation, with the macro it takes 2 seconds. I can process a whole folder full of files in less than a minute.