What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Delete File in VB6

Pages: (2): « First [ 1 ] 2 » Last »
Delete File in VB6
Author: Message:
Iccler
New Member
*

Iccler

Posts: 13
– / Male / –
Joined: Apr 2005
O.P. Delete File in VB6
I need help deleting a file using VB6. For example, I want to delete C:\doc.txt
Can anyone help me?
04-24-2005 12:14 PM
Profile PM Find Quote Report
Millenium_edition
Veteran Member
*****

Avatar

Posts: 1787
Reputation: 57
Joined: Apr 2003
RE: Delete File in VB6
You can use
code:
Kill "c:\doc.txt"
04-24-2005 12:17 PM
Profile E-Mail PM Find Quote Report
Iccler
New Member
*

Iccler

Posts: 13
– / Male / –
Joined: Apr 2005
O.P. RE: Delete File in VB6
Thanks a lot, just missed the quotes.

This post was edited on 04-24-2005 at 12:20 PM by Iccler.
04-24-2005 12:20 PM
Profile PM Find Quote Report
Fergy
Full Member
***

Avatar

Posts: 164
Reputation: 7
36 / Male / Flag
Joined: Nov 2004
RE: Delete File in VB6
Can it be used to delete directories?
I should change my sig ay?
04-24-2005 04:07 PM
Profile E-Mail PM Find Quote Report
Millenium_edition
Veteran Member
*****

Avatar

Posts: 1787
Reputation: 57
Joined: Apr 2003
RE: Delete File in VB6
No, you have to delete every file in every subdirectory, then remove the subdirectories and then remove the dir

code:
RmDir "c:\bla\"
' c:\bla is empty
04-24-2005 04:08 PM
Profile E-Mail PM Find Quote Report
Fergy
Full Member
***

Avatar

Posts: 164
Reputation: 7
36 / Male / Flag
Joined: Nov 2004
RE: Delete File in VB6
okay, thanks for the help
I should change my sig ay?
04-24-2005 04:37 PM
Profile E-Mail PM Find Quote Report
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
38 / Male / Flag
Joined: Jan 2003
RE: Delete File in VB6
quote:
Originally posted by Millenium_edition
No, you have to delete every file in every subdirectory, then remove the subdirectories and then remove the dir

code:
RmDir "c:\bla\"
' c:\bla is empty


Blah thats complicated.  I'm making a questionaire program at the moment  and its my first dealing with multiple forms and saving data its a nightmare and I don't even know where to start
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
04-24-2005 06:10 PM
Profile E-Mail PM Web Find Quote Report
Ahmad
Senior Member
****

Avatar
@hmad

Posts: 526
Reputation: 27
40 / Male / –
Joined: Dec 2004
RE: Delete File in VB6
quote:
Originally posted by Millenium_edition
No, you have to delete every file in every subdirectory, then remove the subdirectories and then remove the dir

code:
RmDir "c:\bla\"
' c:\bla is empty


Use..
code:
ChDir "c:\bla\"
Kill "c:\bla\*.*"
ChDir "c:\"
RmDir "c:\bla\"
or something like that
04-24-2005 06:18 PM
Profile PM Web Find Quote Report
Millenium_edition
Veteran Member
*****

Avatar

Posts: 1787
Reputation: 57
Joined: Apr 2003
RE: Delete File in VB6
quote:
Originally posted by Ahmad
quote:
Originally posted by Millenium_edition
No, you have to delete every file in every subdirectory, then remove the subdirectories and then remove the dir

code:
RmDir "c:\bla\"
' c:\bla is empty


Use..
code:
ChDir "c:\bla\"
Kill "c:\bla\*.*"
ChDir "c:\"
RmDir "c:\bla\"
or something like that
that won't work if the directory has subdirectories.
you have to use dir() to enumerate all the folders & files and then delete every single one of them
04-24-2005 06:43 PM
Profile E-Mail PM Find Quote Report
Dulanjana
New Member
*


Posts: 1
Joined: May 2010
Roll Eyes  RE: delete file in vb
i need to know how to copy file in vb?
05-29-2010 05:00 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On