|
-
Jul 11th, 2000, 09:55 AM
#1
Thread Starter
Addicted Member
I have a file mark.mdb in a known location. i want to rename this file to test.mdb in the same location.
Any ideas?
I am using VB5 SP3
-
Jul 11th, 2000, 10:05 AM
#2
Hyperactive Member
You could use the FileSystemObject and make this really easy.
Code:
Dim fso
Dim AppPath as string
Set fso=CreateObject("scripting.filesystemObject")
AppPath="c:\windows\desktop\database\db11\"
fso.CopyFile AppPath & "sourcebook.mdb",AppPath & "testbook.mdb"
Hope this helps.
-
Jul 11th, 2000, 10:19 AM
#3
Here is another method. It copies the file with a new name, then delete's the old one.
Code:
SourceFile = "C:\Windows\Desktop\tttt.txt"
DestFile = "C:\Windows\Desktop\MyNewFileName.txt"
FileCopy SourceFile, DestFile
Kill SourceFile
-
Jul 11th, 2000, 11:45 AM
#4
Thread Starter
Addicted Member
Thanks
Thanks,
All is well in the land of file renaming
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|