sloppycode.net
FSO Reference
Collections
Drives
Files
Folders
Drive
AvailableSpace
DriveLetter
DriveType
FileSystem
FreeSpace
IsReady
Path
RootFolder
SerialNumber
ShareName
TotalSize
VolumeName
File
Attributes
Copy
DateCreated
DateLastAccessed
DateLastModified
Delete
Drive
Move
Name
OpenAsTextStream
ParentFolder
Path
ShortName
ShortPath
Size
Type
Folder
Attributes
Copy
CreateTextFile
DateCreated
DateLastAccessed
DateLastModified
Delete
Drive
Files
IsRootFolder
Move
Name
ParentFolder
Path
ShortName
ShortPath
Size
SubFolders
Type
FSO
BuildPath
Collections
CopyFile
CopyFolder
CreateFolder
CreateTextFile
DeleteFile
DeleteFolder
Drive
DriveExists
Drives
File
FileExists
Folder
FolderExists
GetAbsolutePathName
GetBaseName
GetDrive
GetDriveName
GetExtensionName
GetFile
GetFileName
GetFileVersion
GetFolder
GetParentFolderName
GetSpecialFolder
GetTempName
MoveFile
MoveFolder
OpenTextFile
TextStream
TextStream
AtEndOfLine
AtEndOfStream
Close
Column
Line
Read
ReadAll
ReadLine
Skip
SkipLine
Write
WriteBlankLines
WriteLine
FSO.OpenTextFile(filename[, inputOuputMode[, createNewFile[, textFileFormat]]])
Opens filename and returns a TextStream object,which allows you to use the TextStream object's methods/properties on it. inputOutPutMode can be: 1 - for reading, 2 - for writing, 8 - for appending. createNewFile should be true if you want to create a new text file if filename doesn't exist. textFileFormat can be one of 3 values: -2 - uses default system type, -1 - creates the textfile in unicode format, 0 - creates the textfile in ascii format.
<% '***************** OpenTextFile Set fso = CreateObject("Scripting.FileSystemObject") Set textStreamObject = fso.OpenTextFile(Server.Mappath("\") & "\textfile.txt",2,true,0) textStreamObject.WriteLine("howdy world") textStreamObject.Close ' Make sure you close it or it won't write it!! Set textStreamObject = Nothing Set fso = Nothing ' This opens textfile.txt for writing, creates the file if it doesn't exist, and sets it to ascii format ' and then write "howdy world" to the file %>
› Home
› C#
› Snippets
› Articles
› Tools
› Taglines
› ASP
› Dictionary Object
› FSO
› Unix cheat sheet
› Gaming
› CSS
› Yak
› Umbraco
› About
› Contact
› Privacy
› Projects
› Search
› Sitemap
Buy on Amazon
Buy on Amazon
Buy on Amazon
Buy on Amazon