
-----------------------------------
copthesaint
Tue Mar 10, 2009 11:32 am

Basic Drive Exploring
-----------------------------------
This basic program explores your computer. 

var BackNext, NextFind, num, NumOfDir : int := 0
var fileName : string
var FoldersHotlink : array 0 .. 100000 of string
var size, attr, fileTime, dir : int
var NextDrive, DriveHotlink : array 0 .. 25 of string := init ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z')
var TRUEFALSEDRIVE : array 0 .. 25 of int
View.Set ("Graphics:max;max")

proc GetDrives (truefalse : boolean)
    NumOfDir := 0
    for i : 0 .. 25
        Dir.Change (NextDrive (i) + ":/")
        if Error.Last = 0 then
            NumOfDir += 1
            DriveHotlink (NumOfDir) := Dir.Current
            if truefalse = true then
                put DriveHotlink (NumOfDir), " ", (NumOfDir)
            end if
        else
            DriveHotlink (i) := ""
        end if
    end for
    if truefalse = true then
        get num
    end if
end GetDrives

proc GetLongDir (DirGet : string)
    NumOfDir := 0
    dir := Dir.Open (DirGet)
    loop
        Dir.GetLong (dir, fileName, size, attr, fileTime)
        exit when fileName = ""
        put fileName : 22, " " ..
        if (attr and attrDir) not= 0 then
            put "   

-----------------------------------
hossack
Wed Mar 11, 2009 7:33 am

RE:Basic Drive Exploring
-----------------------------------
Not bad

-----------------------------------
Tallguy
Wed Mar 11, 2009 7:39 am

RE:Basic Drive Exploring
-----------------------------------
sweet, i like how you did it, good job

-----------------------------------
copthesaint
Wed Mar 11, 2009 6:37 pm

RE:Basic Drive Exploring
-----------------------------------
Yea I am Btw making A full program that wil explore any drive and allow you to open picture and text files, But It will take a week to do because I need to make all my Gui.
It does already open .txt and .bmp, .jpg, .gif files but as I said it won't be finished for probably another week. (Ill need to make a slider bar Gui, and Buttons Gui Once I have done that I will upload the program.
