|
|
![]() |
|
|
Top | #1 |
|
Apple lover, PC User
Joined: November 2002
Location: Australia
Posts: 526
Reputation: 0
Power: 121 |
Thanks.
|
|
|
|
|
|
Top | #2 |
|
bbbb-ring...
Joined: December 2001
Posts: 237
Reputation: 0
Power: 130 |
Sure there is.
Use the Name statement to rename a file. Use Kill to delete a file. VB will overwrite files automatically. That's why it's good practice to check for the existance of the file and ask the user if the want to overwrite it. Seach VB Help for Name and Kill |
|
|
|
|
|
Top | #3 |
|
Unregistered
Posts: n/a
|
Oh no no no no no.
There is a much better, and safer way to rename/delete/copy/move files in VB. Depends on your VB version, assuming VB6 you want to look at the File System Object (check it out on msdn.microsoft.com or www.vbcode.com). name and kill do work, but you have very little control over what they do. The FSO also give you a better error message when a file is in use etc... Have fun! |
|
|
|
Top | #4 |
|
Chamone M*tha Fu*ka
Joined: May 2002
Posts: 288
Reputation: 10
Power: 124 |
Open notepad, copy this as test.vbs and save. Double click it to run!
|
|
|
|
|
|
Top | #5 |
|
bbbb-ring...
Joined: December 2001
Posts: 237
Reputation: 0
Power: 130 |
File System Object assumes a couple of things.
1. A more recent version of VB 2. A slightly more experienced VB programmer. I find it better to start people off with the basics. I will agree that is offers better error handling, but most new programmers don't have an understanding of the importance of that anyway. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with visual basic 6 | saithe | Web Design & Coding | 1 | December 28th, 2005 6:20am |
| visual basic.net help | GhoulScout | Web Design & Coding | 13 | December 16th, 2004 1:12am |
| Visual Basic 6 | adamg | Web Design & Coding | 3 | November 13th, 2003 5:35am |
| Visual Basic | JJH35 | Web Design & Coding | 2 | January 31st, 2003 2:41pm |
| [B]visual basic 6.0[/B] ..easy question for those who know about it | 50Cper23 | Web Design & Coding | 4 | November 1st, 2002 11:27pm |