Changing file extension from REF to CSV

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Asuepe
    New Member
    • Mar 2008
    • 1

    Changing file extension from REF to CSV

    Hi there,

    It's my 1st participation her..
    I make scripts in my work wz a language that is similar to VB

    I need a script to Chang file extension from REF to CSV

    any help ?

    Thx in advance,
    Regards
  • VBWheaties
    New Member
    • Feb 2008
    • 145

    #2
    Originally posted by Asuepe
    Hi there,

    It's my 1st participation her..
    I make scripts in my work wz a language that is similar to VB

    I need a script to Chang file extension from REF to CSV

    any help ?

    Thx in advance,
    Regards
    Real simple to do thanks to the handy Replace function:

    Code:
    Public Function FileExtensionREFToCSV(byVal REFFile As String) As String
       FileExtensionREFToCSV = REPLACE(UCASE(TRIM(REFFile)), '.REF', '.CSV') 
    End Function

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Be warned though, this simple routine will stuff up the name if ".REF" appears anywhere else within it. For example, a file name of "SOMETHING.REFER RING.TO.BLAH.RE F" would become "SOMETHING.CSVERRING.TO.BLAH.CSV".

      Comment

      Working...