Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'finds the files in the current directory
- Dim files() As String = IO.Directory.GetFiles(dir_curr)
- Dim f_runtime As Integer = 0
- 'finds the sub directories in the current directory
- Dim dirs() As String = IO.Directory.GetDirectories(dir_curr)
- 'prevents the program from cutting off bits of the paths
- Dim cut_no As Integer = 2
- If Len(dir_curr) = 3 Then
- cut_no = 1
- End If
- 'writes all the sub directories
- For f_runtime = 0 To dirs.Length - 1
- Console.WriteLine("DIR :: " & Mid$(dirs(f_runtime)(Len(dir_curr)+cut_no),dirs(f_runtime).Length))
- Next f_runtime
- f_runtime = 0
- 'writes all of the files
- For f_runtime = 0 To files.Length - 1
- Console.WriteLine(" " & Mid$(files(f_runtime), (Len(dir_curr) + cut_no), files(f_runtime).Length))
- Next f_runtime
Advertisement
Add Comment
Please, Sign In to add comment