Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename file

Status
Not open for further replies.

tdonahue

Technical User
Feb 4, 2001
50
0
0
US
I am trying to develop a macro to rename a unnamed file to a text file. What command would I use?

Tom
 
Something like this in VBA ?
Name oldpathname As newpathname

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You can try using FileSystemObject
Code:
Dim oFso As Scripting.FileSystemObject
Set oFso = New Scripting.FileSystemObject
oFso.MoveFile "C:\9.txt", "C:\1.txt"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top