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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Renaming a file extension? 2

Status
Not open for further replies.

Dan688

Programmer
Dec 29, 2003
128
GB
Hi all,
Need some code help!
Reading in a file but when EOF is reached and I close the file I want to rename it from .txt to .ren

Any Ideas?
 
use the function FileCopy("C:\sourcefile.txt","C:\destfile.ren") does that make sense?

Noogle
 
Or maybe better look at the Name statement.

If you do use the the filecopy statement as above, don't forget to delete the original file!

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Can you expand on that a little! I tried searching the Help file for it with know luck!
 
Open up your copy of MSDN and use the index tab. If you enter name st, you should find teh command as the first listed.

or you could check the MSDN website and search for "Name Statement" (and don't forget that these commands are actually VBA)

or

follow the link


Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top