• Log in or sign up for an account here: https://www.sythe.org/login

Intresting VB6 Class: FileSystem

Darthatron

Massive Troll

Retired Sectional Moderator
Visual Basic Programmers
Joined
May 22, 2006
Sythe Gold
0
Messages
1,612
Age
35
Location
The internet.
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/"
 
ty!! i have been looking for a command that modifyed read or write values of program!
 
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.
 
Runescape Gamblingrunescape gambling
Back
Top