Results 1 to 4 of 4

Thread: Rename a File

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    England
    Posts
    1

    Post

    How would i rename a file in vb?
    what is the command?
    E.g.
    source file = test.txt
    output file = notatest.txt


    ------------------
    Will Greene

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    Name [oldfilename] As [newfilename]



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    You could try this:
    • Open the file
    • Save the file as different name
    • Close files
    • Delete old file

    Good Luck,

    ------------------
    DiGiTaIErRoR
    VB, QBasic, Iptscrae, HTML
    Quote: There are no stupid questions, just stupid people.

  4. #4
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    I think you'll agree that

    Name [old] As [new]

    is simpler, quicker, and neater.



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width