Computing.Net > Forums > Programming > Visual Basic 6 File Rename

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Visual Basic 6 File Rename

Reply to Message Icon

Name: brian
Date: May 16, 2003 at 06:54:45 Pacific
OS: Windows 2K
CPU/Ram: Intel/512
Comment:

Would it be fairly easy to write a program to batch reanme a set of files. I need to rename several files to include the name of the path in it. For example if I have a file c:\directory1\directory2\file.doc I need it to be c:\Allfiles\directoryonedirectory2file.doc. Is there a program already written for this even?



Sponsored Link
Ads by Google

Response Number 1
Name: Chad
Date: May 16, 2003 at 08:30:09 Pacific
Reply:

I'm not sure if you already know the exact filenames or if your doing a search, directory dump file listing, etc...
But anyhow there is a simple VisualBasic command for renaming files...

command: Name oldfile AS newfile
This works if they are in same directory

Another method also works if the directories are not the same...

FILECOPY oldfile,newfile
KILL oldfile


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Visual Basic 6 File Rename

Visual Basic 6.0 www.computing.net/answers/programming/visual-basic-60/4156.html

Visual Basic 6.0 www.computing.net/answers/programming/visual-basic-60/18485.html

List Databses is Visual Basic 6 www.computing.net/answers/programming/list-databses-is-visual-basic-6/15612.html