Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

ASP Tutorial
ASP Introduction
Run An ASP Web Page
ASP First Script
ASP Programming-VBScript
Variables in ASP
Array in ASP
Operators in ASP
ASP If Statements
ASP Select Statements
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
Application in ASP
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream
ASP Drive
ASP File
ASP Folder
ASP Dictionary
ASP ADO
ASP Ad Rotator
ASP Browser Cap
ASP Content Linking
ASP Content Rotator
ASP Quick Reference
ASP Summary

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


ASP FileSystem Object
Previous Next

To access the file system on the server, the FileSystemObject object is used.



The FileSystemObject Object
To access the file system on the server, the FileSystemObject object is used. we can manipulate files, folders,and directory paths using this object. With this object,it is also possible to retrieve file system information .

The following code creates text file (D:\test.txt) and then writes some text to the file:

<%
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("D:\test.txt",true)
fname.WriteLine("Hello World!")
fname.Close
set fname=nothing
set fs=nothing
%>



The FileSystemObject object's properties and methods are described below
Properties
Property Description
Drives

Returns a collection of all Drive objects on the computer

Methods
Method Description
BuildPath

Appends a name to an existing path

CopyFile e

Copies one or more files from one location to another

CopyFolder

Copies one or more folders from one location to another

CreateFolder

Creates a new folder

CreateTextFile

Creates a text file and returns a TextStream object that can be used to read from, or write to the file

DeleteFile

Deletes one or more specified files

DeleteFolder

Deletes one or more specified folders

DriveExists

Checks if a specified drive exists

FileExists

Checks if a specified file exists

FolderExists

Checks if a specified folder exists

GetAbsolutePathName

Returns the complete path from the root of the drive for the specified path

GetBaseName

Returns the base name of a specified file or folder

GetDrive

Returns a Drive object corresponding to the drive in a specified path

GetDriveName

Returns the drive name of a specified path

GetExtensionName

Returns the file extension name for the last component in a specified path

GetFile

Returns a File object for a specified path

GetFileName

Returns the file name or folder name for the last component in a specified path

GetFolder

Returns a Folder object for a specified path

GetParentFolderName

Returns the name of the parent folder of the last component in a specified path

GetSpecialFolder

Returns the path to some of Windows' special folders

GetTempName

Returns a randomly generated temporary file or folder

MoveFile

Moves one or more files from one location to another

MoveFolder

Moves one or more folders from one location to another

OpenTextFile

Opens a file and returns a TextStream object that can be used to access the file



Check whether a specified file exist or not
<html>
<body>

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

If (fs.FileExists("D:\winnt\cursors\3dgarro.cur"))=true Then
      Response.Write("File c:\winnt\cursors\3dgarro.cur exists.")
Else
      Response.Write("File c:\winnt\cursors\3dgarro.cur does not exist.")
End If

set fs=nothing
%>

</body>
</html>
O/P:

File D:\winnt\cursors\3dgarro.cur exists.


Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords: cdonts component, cdonts dim, active server pages, cdonts recipients


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.