Results 1 to 3 of 3

Thread: How to delete & rename files?

  1. #1

    Thread Starter
    Addicted Member P.S.W.'s Avatar
    Join Date
    Aug 2000
    Posts
    146

    Question

    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.


  2. #2
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Take a look at the MSDN documentation and look for:
    FileSystemObject. This should help you with your file needs.

    -Excalibur

  3. #3
    Addicted Member
    Join Date
    Aug 2000
    Location
    Columbus Ohio
    Posts
    217

    Here you go ;)

    to delete a file use this:
    where filepath = the files path
    Code:
    kill filepath
    to rename a file do this:
    where oldpath = the original name and directory
    and newpath = new name and directory
    Code:
    Name oldpath as newpath
    Chris

    [email protected]
    Windows XP RC2 B2526
    Visual Studio.Net Beta 2
    C++, VB, VB.Net, ASP, PHP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width