Categories

Select Case example

Select case example in ASP

Select Case example

Bookmark It

Folder path and size

This will display the path to a folder and the size of it in bytes

Folder path and size

<% Set MyFileSize = Server.CreateObject ("Scripting.FileSystemObject") MyPath = Server.MapPath("/") Set MyFolder = MyFileSize.GetFolder(MyPath) %>

<p><% =MyPath %> is <% =MyFolder.Size %> bytes</p>

Bookmark It

Move a folder

This moves a folder called testfolder to testfolder1 on the d drive

Move a folder

<% Set fso = CreateObject("Scripting.FileSystemObject") fso.MoveFolder "d:\testfolder"

Bookmark It

Create a folder

creates a folder called New Folder1

Create a folder

<% Dim fso Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateFolder("d:\New Folder1") %>

Bookmark It

Copy a file

This copies a file called test.txt to test2.txt

Copy a file

<% Dim objFSO

Bookmark It