Click here to Skip to main content
15,905,232 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Sorry now in english => system.UnauthorizedAccessException during access on system directory Pin
Guffa7-Feb-06 11:13
Guffa7-Feb-06 11:13 
GeneralRe: Sorry now in english => system.UnauthorizedAccessException during access on system directory Pin
cosma2177-Feb-06 11:22
cosma2177-Feb-06 11:22 
AnswerThe system directory is protected by the OS Pin
JUNEYT8-Feb-06 0:31
JUNEYT8-Feb-06 0:31 
GeneralRe: The system directory is protected by the OS Pin
cosma2178-Feb-06 4:46
cosma2178-Feb-06 4:46 
GeneralRe: The system directory is protected by the OS Pin
JUNEYT8-Feb-06 5:03
JUNEYT8-Feb-06 5:03 
GeneralRe: The system directory is protected by the OS Pin
cosma2178-Feb-06 8:36
cosma2178-Feb-06 8:36 
GeneralRe: The system directory is protected by the OS Pin
JUNEYT8-Feb-06 22:42
JUNEYT8-Feb-06 22:42 
GeneralRe: The system directory is protected by the OS Pin
cosma2179-Feb-06 16:40
cosma2179-Feb-06 16:40 
Good morning Journey,

Thanks for taking care of my problem. I havn't check your code yet because I'm a little bit tired for spending my nights in front of the computer. I find another solution with the ATTRIBUTE Class. It's works too. I will check your code next week because my leave starts.

If you can find a hidden problem in my code please tell.

Public Function BrowseForMediaFiles(ByRef AL_MediaFileAndPath As ArrayList, ByVal selectedPath As String, ByVal exTensions() As String) As ArrayList
Dim dic As New IO.DirectoryInfo(selectedPath)
Dim AtrrDir As Object

For Each Filter As String In exTensions
For Each fname As String In System.IO.Directory.GetFiles(selectedPath, "*." + Filter, IO.SearchOption.TopDirectoryOnly)
AL_MediaFileAndPath.Add(fname)

Next fname
Next Filter

For Each dirc As IO.DirectoryInfo In dic.GetDirectories()
AtrrDir = dirc.Attributes 'Determine directory attribut.

Select Case AtrrDir
Case 22, 8214
'AtrrDir=22 The directory is a system directory. The directory is part
'of the operating system or used exclusively by the operating system

Case Else
For Each Filter As String In exTensions
For Each fname As String In System.IO.Directory.GetFiles(dirc.FullName, "*." + Filter, IO.SearchOption.AllDirectories)
AL_MediaFileAndPath.Add(fname)

Next fname
Next Filter
End Select
Next dirc

Return AL_MediaFileAndPath

End Function 'BrowseForMediaFiles
Questionsystem.UnauthorizedAccessException bei Zugriff auf Systemverzeichnis Pin
cosma2177-Feb-06 10:12
cosma2177-Feb-06 10:12 
AnswerRe: system.UnauthorizedAccessException bei Zugriff auf Systemverzeichnis Pin
Christian Graus7-Feb-06 10:59
protectorChristian Graus7-Feb-06 10:59 
QuestionA carriage Return Pin
Mark067-Feb-06 9:39
Mark067-Feb-06 9:39 
AnswerRe: A carriage Return Pin
Christian Graus7-Feb-06 9:51
protectorChristian Graus7-Feb-06 9:51 
GeneralRe: A carriage Return Pin
Mark067-Feb-06 9:59
Mark067-Feb-06 9:59 
GeneralRe: A carriage Return Pin
Christian Graus7-Feb-06 10:20
protectorChristian Graus7-Feb-06 10:20 
QuestionShowing image or icon on XP Button in VB.NET Pin
Hari Om Prakash Sharma7-Feb-06 7:42
Hari Om Prakash Sharma7-Feb-06 7:42 
AnswerRe: Showing image or icon on XP Button in VB.NET Pin
Mekong River7-Feb-06 15:05
Mekong River7-Feb-06 15:05 
Questionupgrade program to vb6 Pin
taurus7777-Feb-06 7:18
taurus7777-Feb-06 7:18 
AnswerRe: upgrade program to vb6 Pin
Dave Kreskowiak7-Feb-06 7:42
mveDave Kreskowiak7-Feb-06 7:42 
AnswerRe: upgrade program to vb6 Pin
Mekong River7-Feb-06 15:00
Mekong River7-Feb-06 15:00 
QuestionThe best way to work with sql database. Pin
UniBond7-Feb-06 6:01
UniBond7-Feb-06 6:01 
AnswerRe: The best way to work with sql database. Pin
Dave Kreskowiak7-Feb-06 6:46
mveDave Kreskowiak7-Feb-06 6:46 
GeneralRe: The best way to work with sql database. Pin
UniBond7-Feb-06 10:03
UniBond7-Feb-06 10:03 
GeneralRe: The best way to work with sql database. Pin
Dave Kreskowiak7-Feb-06 11:10
mveDave Kreskowiak7-Feb-06 11:10 
AnswerRe: The best way to work with sql database. Pin
Guffa7-Feb-06 14:06
Guffa7-Feb-06 14:06 
Question.NET Images...Where R They?? Pin
AlexeiXX37-Feb-06 5:28
AlexeiXX37-Feb-06 5:28 

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.