VERSION 5.00
Begin VB.Form frmFS 
   Caption         =   " Singlix File System"
   ClientHeight    =   7530
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8520
   Icon            =   "frmFS.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   7530
   ScaleWidth      =   8520
   StartUpPosition =   1  'CenterOwner
   Begin VB.CommandButton Command1 
      Caption         =   "Kapat"
      Height          =   375
      Left            =   7080
      TabIndex        =   3
      Top             =   6720
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   6120
      Width           =   8055
   End
   Begin VB.Label Label3 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   5055
      Left            =   240
      TabIndex        =   4
      Top             =   240
      Width           =   8055
   End
   Begin VB.Label Label2 
      Caption         =   "Dizin :"
      Height          =   375
      Left            =   240
      TabIndex        =   2
      Top             =   5520
      Width           =   495
   End
   Begin VB.Label Label1 
      Height          =   375
      Left            =   960
      TabIndex        =   1
      Top             =   5520
      Width           =   7335
   End
End
Attribute VB_Name = "frmFS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Dizin As String
Dim Satir As String
Dim Direntry As String
Dim Arg1 As String
Dim Komut As String
Dim L As Integer
Dim X As Integer
Dim Y As Integer
Dim T As String

Private Sub Command1_Click()
End
End Sub

Private Sub Form_Load()
Dizin = "FS:/> "
Label1.Caption = Dizin
End Sub

Private Sub KomutAl(SatirAl As String)
Label3.Caption = ""
Label1.Caption = Dizin + SatirAl
Text1.Text = ""
L = Len(SatirAl)
If L > 1 Then
   For X = 1 To L
       T = Mid$(SatirAl, X, 1)
       If T = Chr$(0) Or T = Chr$(32) Then
          Komut = Left$(SatirAl, X - 1)
          X = X + 1
          Exit For
       End If
   Next X
   If L > X Then
      If Mid$(SatirAl, X, 1) <> Chr$(32) Then
         Y = X
         For X = X + 1 To L
             T = Mid$(SatirAl, X, 1)
             If T = Chr$(0) Or T = Chr$(32) Then
                Arg1 = Mid$(SatirAl, Y, X - Y + 1)
                Exit For
             End If
         Next X
      End If
   End If
End If
Select Case Komut
       Case "CD"
       If Len(Arg1) > 0 Then
          On Error GoTo PathNotFound
          ChDir Arg1
          Label3.Caption = CurDir
       End If
       Case "DIR"
            Dim Direntry As String
            Direntry = Dir("*.*", vbDirectory)
            Label3.Caption = Direntry
            Do
               Direntry = Dir
               Label3.Caption = Label3.Caption + Chr$(13) + Direntry
            Loop Until Direntry = ""

End Select
Cikis:
Exit Sub
PathNotFound:
Label3.Caption = "Directory not found!"
Resume Cikis
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   Satir = UCase(Trim$(Text1.Text)) + Chr$(0)
   Call KomutAl(Satir)
End If
End Sub
