Results 1 to 2 of 2

Thread: rename file

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    how do you rename a file with vB code, like to copy a file you would use FileCopy, is there a way like that to rename files?

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523
    Use Name Function:
    Code:
    Dim OldName, NewName
    OldName = "OLDFILE"
    NewName = "NEWFILE"   ' Define file names.
    
    Name OldName As NewName   ' Rename file. 
    
    
    '////////////2nd Example
    OldName = "C:\MYDIR\OLDFILE"
    NewName = "C:\YOURDIR\NEWFILE"
    Name OldName As NewName   ' Move and rename file.

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