mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-23 02:12:14 +00:00
20 lines
770 B
VB.net
20 lines
770 B
VB.net
|
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
|