blob: 479d050a90ccf5f1ad30cfc7f027fad1a835e344 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Module Com_Cd
Public Sub NavigateDir(TheDirectory As String)
If TheDirectory = ".." Then
If Console.CurrentDirectory = Strings.OnceInfo(1) Then
NewLine("!\")
Else
Console.CurrentDirectory = IO.Directory.GetParent(Console.CurrentDirectory).ToString
End If
Else
If IO.Directory.Exists(Console.CurrentDirectory + "\" + TheDirectory) Then
Console.CurrentDirectory = Console.CurrentDirectory & "\" & TheDirectory
ElseIf IO.Directory.Exists(TheDirectory) Then
Console.CurrentDirectory = TheDirectory
Else
NewLine("The directory is not exist!")
End If
End If
End Sub
End Module
|