Hi everybody,
I am compacting a database file and need to delete the old file and rename the new one. Can anyone help me with the VB code/syntax used to rename & delete files? Your help is appreciated.
Printable View
Hi everybody,
I am compacting a database file and need to delete the old file and rename the new one. Can anyone help me with the VB code/syntax used to rename & delete files? Your help is appreciated.
Take a look at the MSDN documentation and look for:
FileSystemObject. This should help you with your file needs.
-Excalibur
to delete a file use this:
where filepath = the files path
to rename a file do this:Code:kill filepath
where oldpath = the original name and directory
and newpath = new name and directory
Code:Name oldpath as newpath