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

How can I remane a bunch of files in VB 6.0 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I am using the FileCopy command to copy a file to a new name
This is slow because some of the files are large and I need to rename 498 files.
I am just renaming the first letter from X to Z

Is'nt there a Rename command in VB 6.0?

TIA DougP, MCP
 
Yes. Just look at "Help" and search for "rename".
 
Did that and I don't see it?
DougP, MCP
 

It's Name that you are looking for ... from help ...

[tt]
Name Statement Example
This example uses the Name statement to rename a file. For purposes of this example, assume that the directories or folders that are specified already exist.

Dim OldName, NewName
OldName = "OLDFILE": NewName = "NEWFILE" ' Define file names.
Name OldName As NewName ' Rename file.

OldName = "C:\MYDIR\OLDFILE": NewName = "C:\YOURDIR\NEWFILE"
Name OldName As NewName ' Move and rename file.

[/tt]

Good Luck

 
That's it
Thanks vb5prgrmr,

How 'bout a Star DougP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top