Announcement

Collapse
No announcement yet.

Editing a filename

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scott Turchin
    replied
    Name Trm_SP_00M.dta As Trm_SP_M00.dta

    Tom hit that one...

    I had this issue a while back and walah, Name is quick and efficient and can do those 120 files downright quick..




    ------------------
    Scott

    Leave a comment:


  • Tom Hanlin
    replied
    Use the NAME statement.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Mike Trader
    started a topic Editing a filename

    Editing a filename

    I need to change a few characters in a filename:
    for example:
    Trm_SP_00M.dta
    to
    Trm_SP_M00.dta

    I have written a little code to do it then I simply use:
    FILECOPY FilePathStr+FileNameStr, FilePathStr+DestFile
    KILL FilePathStr+FileNameStr

    To copy the old file to a new file with the new name (DestFile)

    The problem is this slooooooow.
    each file is about 2mb and i have to convert 120 files at once. My program slows to a crawl while the HD catchs up

    SO, is there a way to access the filename directly and change it without copying the file?

    ------------------
    Kind Regards
    Mike
Working...
X