Click here to Skip to main content
15,890,123 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionproblem with windows service - msgbox problem Pin
BSRK17-Nov-06 19:08
BSRK17-Nov-06 19:08 
AnswerRe: problem with windows service - msgbox problem Pin
MatrixCoder19-Nov-06 22:09
MatrixCoder19-Nov-06 22:09 
QuestionHow do I delete all files in a folder? Pin
Code Crapper17-Nov-06 14:18
Code Crapper17-Nov-06 14:18 
AnswerRe: How do I delete all files in a folder? Pin
Christian Graus17-Nov-06 15:08
protectorChristian Graus17-Nov-06 15:08 
GeneralRe: How do I delete all files in a folder? Pin
Code Crapper18-Nov-06 12:36
Code Crapper18-Nov-06 12:36 
GeneralRe: How do I delete all files in a folder? Pin
Christian Graus18-Nov-06 12:55
protectorChristian Graus18-Nov-06 12:55 
AnswerRe: How do I delete all files in a folder? Pin
Janani Divya17-Nov-06 15:22
Janani Divya17-Nov-06 15:22 
AnswerRe: How do I delete all files in a folder? Pin
The ANZAC18-Nov-06 13:24
The ANZAC18-Nov-06 13:24 
If you want to delete all the files in a folder, the best approach would be to use a for/next statement. use a listbox for your display as oppose to a textbox.

Dim di as new system.io.directoryinfo = "your directory" '(1)
Dim fi as system.io.fileinfo

for each fi in di.getfiles'(5)
'(4)
listbox1.items.add(fi.filename)
fi.delete '(2) (3)
'(4)
next

Note:
(1) You could use a folder browser dialog to establish the folder or for the user to establish the folder
(2) When testing, have a test folder filled with copies files or something.
(3) If you wished to display first then give the option of deleting, you could put a similar for/next statement under a button's click action or something and only have delete option.
(4) You could have an if statement here for certain paremeters
(5) In the brackets after getfiles, you can specify file type



Posted by The ANZAC

GeneralRe: How do I delete all files in a folder? Pin
Code Crapper19-Nov-06 2:14
Code Crapper19-Nov-06 2:14 
QuestionHow to open and view TIF in Access Pin
Tech.Wizard17-Nov-06 13:19
Tech.Wizard17-Nov-06 13:19 
QuestionProblem: .NET 2.0 File.GetLastWriteTime(path) Keeps adding 1 hour Pin
zonkerman17-Nov-06 13:12
zonkerman17-Nov-06 13:12 
AnswerRe: Problem: .NET 2.0 File.GetLastWriteTime(path) Keeps adding 1 hour Pin
Johan Hakkesteegt19-Nov-06 22:20
Johan Hakkesteegt19-Nov-06 22:20 
AnswerRe: Problem: .NET 2.0 File.GetLastWriteTime(path) Keeps adding 1 hour Pin
Cheeso8-Mar-09 12:35
Cheeso8-Mar-09 12:35 
QuestionHow Check if the User Control is already viewed ?? Pin
kindman_nb17-Nov-06 13:03
kindman_nb17-Nov-06 13:03 
AnswerRe: How Check if the User Control is already viewed ?? Pin
Christian Graus17-Nov-06 13:10
protectorChristian Graus17-Nov-06 13:10 
GeneralRe: How Check if the User Control is already viewed ?? Pin
kindman_nb17-Nov-06 13:21
kindman_nb17-Nov-06 13:21 
GeneralRe: How Check if the User Control is already viewed ?? Pin
Christian Graus17-Nov-06 15:07
protectorChristian Graus17-Nov-06 15:07 
QuestionRemoving all checked items in a checked list box. Pin
The ANZAC17-Nov-06 11:05
The ANZAC17-Nov-06 11:05 
AnswerRe: Removing all checked items in a checked list box. Pin
Are Jay17-Nov-06 18:13
Are Jay17-Nov-06 18:13 
AnswerRe: Removing all checked items in a checked list box. Pin
Daytona_67518-Nov-06 3:38
Daytona_67518-Nov-06 3:38 
GeneralRe: Removing all checked items in a checked list box. Pin
The ANZAC18-Nov-06 10:49
The ANZAC18-Nov-06 10:49 
QuestionDrawing Line and Bar Graph on the same Graph Space Pin
PeterTF17-Nov-06 9:12
PeterTF17-Nov-06 9:12 
AnswerRe: Drawing Line and Bar Graph on the same Graph Space Pin
Christian Graus17-Nov-06 13:11
protectorChristian Graus17-Nov-06 13:11 
QuestionGoogle Translate in vb.net Pin
JoshKrak17-Nov-06 8:58
JoshKrak17-Nov-06 8:58 
QuestionMultiLanguage Support Pin
Syed Shahid Hussain17-Nov-06 8:49
Syed Shahid Hussain17-Nov-06 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.