'************************************** ' Name: Folder Management Functions (Cre ' ate, Delete, Move etc...) ' Description:Functions to Create folder ' , Delete Folder, Move Folder, Copy Folde ' r, Check if File Exists, and folder size ' in bytes ' By: snowboardr (from psc cd) ' ' ' Inputs:Server.MapPath() to get the cur ' rent directory so you would run the Crea ' te Folder function Like so CreateFolder(Server.MapPath("\test")) ' ' Returns:None ' 'Assumes:None ' 'Side Effects:DeleteFolder Will remove e ' verything within that folder... and beca ' refull you dont delete the wrong directo ' ry. '************************************** <% '####################################### ' '# Folder Management Functions '# Written By Jason '# '#################################### ' # '# Site San Diego '# sitesd.com '####################################### ' Dim objFso '# CREATE FOLDER Function CreateFolder(fdirCRE) Set objFso = CreateObject("Scripting.FileSystemObject") If Not objFso.FolderExists(fdirCRE) Then objFso.CreateFolder(fdirCRE) Else Exit Function End If set objFso = nothing End Function '# DELETE FOLDER Function DeleteFolder(fdirDEL) Set objFso = CreateObject("Scripting.FileSystemObject") If objFso.FolderExists(fdirDEL) Then objFso.DeleteFolder(fdirDEL) End If set objFso = nothing End Function '# MOVE FOLDER Function MoveFolder(fdirM1, fdirM2) Set objFso = CreateObject("Scripting.FileSystemObject") objFso.MoveFolder fdirM1, fdirM2 set objFso = nothing End Function '# COPY FOLDER Function CopyFolder(fdirC1, fdirC2, fdirC3) If fdirC3 = "" then fdirC3 = False Set objFso = CreateObject("Scripting.FileSystemObject") objFso.CopyFolder fdirC1, fdirC2, fdirC3 set objFso = nothing End Function '# CHECK IF FILE EXSISTS Function FileHere(fdirHere) Set objFso = CreateObject("Scripting.FileSystemObject") If objFso.FileExists(fdirHere) Then FileHere = True Else FileHere = False End If set objFso = nothing End Function '# Folder Size Function FolderSize(filespec) Set fso = CreateObject("Scripting.FileSystemObject") Dim fso, f, s If fso.FolderExists(filespec) Then Set f = fso.GetFolder(filespec) s = f.size If s = "" then s = "0" Else s = "0" End If FolderSize = CLNG(s) Set fso=nothing End Function %>