Adblock breaks this site

Intresting VB6 Class: FileSystem

Discussion in 'Archives' started by Darthatron, May 14, 2007.

  1. Darthatron

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0
    Intresting VB6 Class: FileSystem

    FileCopy(Source As String, Destination As String): Copies a file from the source to the destination location.
    Code:
    FileCopy "C:/temp1/temp.exe", "C:/temp2/copyoftemp.exe"
    FileDateTime(PathName As String): Shows the date and time stamp of a file.
    Code:
    Label1.Caption = FileDateTime("C:/temp1/temp.exe")
    FileLen(PathName As String): Shows the size of a file in bytes.
    Code:
    Label1.Caption = FileLen("C:/temp1/temp.exe")
    GetAttr(PathName As String) As VbFileAttribute: Shows data such as if a file is Read-Only, Hidden or the Directory.
    Code:
    If GetAttr("C:/temp1/temp.exe") = vbReadOnly Then
        Label1.Caption = "Read-Only"
    Else
        Label1.Caption = "Read/Write"
    End If
    SetAttr(PathName As String) As VbFileAttribute: Sets the data such as if a file is Read-Only or Hidden.
    Code:
    SetAttr "C:/temp1/temp.exe" = vbReadOnly
    Kill(PathName As String): Deletes a file from your computer.
    Code:
    Kill "C:/temp1/temp.exe"
    MkDir(Path As String): Makes a new Folder or Directory.
    Code:
    MkDir "C:/temp1/"
    RmDir(Path As String): Removes a Folder or Directory.
    Code:
    RmDir "C:/temp1/"
     
  2. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Intresting VB6 Class: FileSystem

    umm, Darth this isn't a Class File. Its just afew inbuilt vb6 functions like len(), instr() etc.

    Although it will come in handy if you are doing something with file storing / copying ;)
     
  3. ardnat

    ardnat Guest

    Referrals:
    0
    Intresting VB6 Class: FileSystem

    ty!! i have been looking for a command that modifyed read or write values of program!
     
  4. Darthatron

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0
    Intresting VB6 Class: FileSystem

    Haha! I helped someone, I knew it!
     
  5. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    Intresting VB6 Class: FileSystem

    Covey actually it is a class. It may not be a class module, but it is still a class. All built in functions are in a class. Check the object browser. Everything is under classes.

    For everyone that didn't know, to find the object browser go to "View" then go to "Object Browser" or you can press F2.

    If you haven't looked at it I recommend you do. It has almost all (if not all) built in functions listed.
     
< sell barrow pure | rate/hate/offer >


 
 
Adblock breaks this site