forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdir_test.py
More file actions
13 lines (10 loc) · 409 Bytes
/
dir_test.py
File metadata and controls
13 lines (10 loc) · 409 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
# Script Name : dir_test.py
# Author : Craig Richards
# Created : 29th November 2011
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Tests to see if the directory testdir exists, if not it will create the directory for you
import os # Import the OS module
if not os.path.exists('testdir'): # Check to see if it exists
os.makedirs('testdir') # Create the directory