[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

objFSO.CreateFolder Run Once

Hello

I have a command in my logon script to do the necessary, but of course, when you next log on you get a lovely error message saying the folder already exists.

What other code do I have to include so I this line will only run when C:\Temp doesn't exist?

Thanks.
objFSO.CreateFolder "C:\Temp"

Open in new window

0
mishcondereya
Asked:
mishcondereya
1 Solution
 
usachrisk1983Commented:
Try:
if not objFSO.FileExists("c:\temp") then objFSO.CreateFolder "C:\Temp"

Open in new window

0
 
käµfm³d 👽Commented:
If Not objFSO.FolderExists("C:\Temp") Then
    objFSO.CreateFolder "C:\Temp"
End If
0
 
mishcondereyaAuthor Commented:
Quick!!!! Top man!!!
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now