Advertisement
1_2002 Files/ File Controls/ Input/ Output #104522

Check for existing Directories/Folders

Check if that directory exists before running the risk of an error and/or data loss. One of the few that really works. No API, no function calls. Existence check and logic included. Incredibly simple.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
'By Jim Sivage 
'
'ISO Global
'http://www.isoglobal.com
'
'
'Make f$ equal to folder you're testing.
'
f$ = "C:\WINDOWS"
dirFolder = Dir(f$, vbDirectory)
If dirFolder <> "" Then
 strmsg = MsgBox("This folder already exists.", vbCritical):goto optout
End If
'directory exists action here
optout:
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine