Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Windows Scripting - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

E-Commerce is taking over the traditional commerce practices. It is of special concern for the IT students. Following are the key points of these Lecture Slides : Webbed Structure, Web Site Organization, Content Fits, Hierarchical Structure, Business Organizational, Additional Details, Combines Structured, Crosslinked, Pages, Enable Visitors

Typology: Slides

2012/2013

Uploaded on 07/30/2013

post_box
post_box 🇮🇳

4.7

(3)

121 documents

1 / 15

Toggle sidebar

Related documents


Partial preview of the text

Download Windows Scripting - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity! Building & Managing Web Sites FileSystemObject Object Docsity.com Windows Scripting • Microsoft Windows Script Host (WSH) allows running of VBScript and JScript natively within the base Operating System. • Introduced with Win98+, but available for Windows 95, 98, NT 4, and Win2000 operating systems. • Using scripting languages, can write script to automate common tasks, and to create powerful macros and logon scripts. Docsity.com ASP and FileSystemObject (FSO) • ASP uses native objects (Response), installable components (Browser Capabilities), & WSH objects (e.g., FileSystemObject) • The FileSystemObject (FSO) is the “window” to server’s file system. Allows querying and manipulation of: – text files – folders – drives • FSO often offers many ways to do the same thing Docsity.com Using FSO in ASP • All operations start with FSO instantiation • FSO operations involve disk access and will typically be slower than other ASP operations • FSO operations performing write operations will not scale well for heavily used pages Dim fso Set fso = Server.CreateObject("Scripting.FileSystemObject") Docsity.com Using FSO in ASP • FSO has one property - FSO.Drives • Returns a Drives collection consisting of all Drive objects available on the local machine. Set fso = Server.CreateObject("Scripting.FileSystemObject") Set dc = fso.Drives For Each d in dc Response.Write d & “<BR>” Next Docsity.com GetFolder and Files • Instantiate the Folder’s file collection to view the files in the folder. • Can query each file’s properties like Name, Size, Path, etc. sDir = Server.MapPath(".") Set fso = Server.CreateObject("Scripting.FileSystemObject") Set objFldr = fso.GetFolder(sDir) Set objFileColl = objFldr.Files For Each file in objFileColl response.write file.Name & "<BR>" Next Docsity.com GetFile Property • Another way to query a specific files’ properties. Set fs = CreateObject("Scripting.FileSystemObject") Set objFile = fs.GetFile("c:\test\test.txt") Response.Write " Name:" & objFile.Name Response.write " Size:" & objfile.Size & "<BR>" Docsity.com CreateTextFile Method • Syntax: object.CreateTextFile(filename[, overwrite[, unicode]]) • Overwrite relevant only if file already exists. Default is existing files not overwritten (false) • Instantiates a TextStream Object for manipulations Set fs = Server.CreateObject("Scripting.FileSystemObject") Set objFile = fs.CreateTextFile("c:\test\testfile.txt", True) objFile.WriteLine("This is a test.") objFile.Close Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved