-
-
Save brightstreetgroup/8166eb3850916a05319e to your computer and use it in GitHub Desktop.
Create new folder with Classic ASP. GHData is a network path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
On Error Resume Next | |
Response.Write("<strong>Folder Create Tester: </strong> <br/><hr>") | |
strFilesRootPath = "\\ServerName\Test" | |
intECNumber = "ShaneTest123" | |
strECPath = strFilesRootPath & "\" & intECNumber | |
Response.Write("Attempting to create folder at: " & strECPath & " (Test Run at: " & Time & ")") | |
Set objFSO = Server.CreateObject("Scripting.FileSystemObject") | |
Response.Write("<br/>Is objFSO a valid object? " & IsObject(objFSO)) | |
Response.Write("<br/>Does Folder Exist? " & objFSO.FolderExists(strECPath)) | |
Response.Write("<hr>") | |
If NOT objFSO.FolderExists(strECPath) Then | |
Response.Write("<br/>Attempting to Create Folder... <strong>" & strECPath & "</strong>") | |
objFSO.CreateFolder(strECPath) | |
If Err.Number <> 0 Then | |
Response.Write("<br/><br/><span style='color:red'>Error Creating Folder!") | |
Response.Write("<br/>Number: <strong>" & Err.Number & "</strong>") | |
Response.Write("<br/>Description: <strong>" & Err.Description & "</strong>") | |
Response.Write("<br/>Source: <strong>" & Err.Source & "</strong>") | |
Response.Write("</span><br/>") | |
Err.Clear | |
Else | |
Response.Write("<br/><span style='color: green'>The Folder Created successfully. </span><br/>") | |
End If | |
Response.Write("<hr><br/>Test Completed.") | |
End If | |
Set objFSO = Nothing | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment