Solved

objFSO.CreateFolder Run Once

Posted on 2009-05-08
3
350 Views
Last Modified: 2012-05-06
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
Comment
Question by:mishcondereya
3 Comments
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 24334982
Try:
if not objFSO.FileExists("c:\temp") then objFSO.CreateFolder "C:\Temp"

Open in new window

0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 24334998
If Not objFSO.FolderExists("C:\Temp") Then
    objFSO.CreateFolder "C:\Temp"
End If
0
 

Author Closing Comment

by:mishcondereya
ID: 31579383
Quick!!!! Top man!!!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now