Intresting VB6 Class: FileSystem

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

Intresting VB6 Class: FileSystem
  1. Unread #1 - May 14, 2007 at 9:00 AM
  2. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    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/"
     
  3. Unread #2 - May 14, 2007 at 9:08 AM
  4. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    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 ;)
     
  5. Unread #3 - May 25, 2007 at 4:17 PM
  6. ardnat
    Referrals:
    0

    ardnat Guest

    Intresting VB6 Class: FileSystem

    ty!! i have been looking for a command that modifyed read or write values of program!
     
  7. Unread #4 - May 26, 2007 at 9:05 AM
  8. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Intresting VB6 Class: FileSystem

    Haha! I helped someone, I knew it!
     
  9. Unread #5 - May 26, 2007 at 12:41 PM
  10. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site