Back to SDS/2 Parametric Scripts

 

import os

 

dir_name = (os.path.join('C:/', 'SDS2_7.0', 'macro'))

 

a = os.walk(dir_name)

 

for root, dir, file in os.walk(dir_name):

   

    print "Root directory: %s" % (root)

   

    if len(dir) > 0:

        print "Subdirectories under %s:" % (root)

        dirList = map(lambda x: '%s\n' % (x), dir)

        dirStr = "".join(dirList)

        print dirStr

    else:

        print "There are no subdirectories under directory %s" % (root)

       

    if len(file) > 0:

        print "Files in directory %s:" % (root)

        fileList = map(lambda x: '%s\n' % (os.path.join(root, x)), file)

        fileStr = "".join(fileList)

        print fileStr

    else:

        print "There are no files in directory %s" % (root)

 

 

'''

>>> Root directory: C:/SDS2_7.0\macro

Subdirectories under C:/SDS2_7.0\macro:

DD_Stuff

Defaults

examples

Images

macrolib

New Versions

Non-Public

Released to DD

Work In Progress

Zip

 

Files in directory C:/SDS2_7.0\macro:

C:/SDS2_7.0\macro\600-Col_SafetyHoles.py

C:/SDS2_7.0\macro\600-Outrigger_15S3_01.py

C:/SDS2_7.0\macro\600-Outrigger_under_L4.py

C:/SDS2_7.0\macro\600-SS_BentPl.py

C:/SDS2_7.0\macro\605-SS_BentPl.py

C:/SDS2_7.0\macro\angle.txt

C:/SDS2_7.0\macro\B-E2.pdf

C:/SDS2_7.0\macro\Basis3D.txt

C:/SDS2_7.0\macro\Basis3D_Post.txt

C:/SDS2_7.0\macro\Basis3D_Post2.txt

C:/SDS2_7.0\macro\BeamAngleFill.txt

C:/SDS2_7.0\macro\BeamBPLPourstop.txt

C:/SDS2_7.0\macro\BeamFraming.txt

C:/SDS2_7.0\macro\BeamHSSFill.txt

C:/SDS2_7.0\macro\BeamStiff.txt

C:/SDS2_7.0\macro\BeamWFFill.txt

C:/SDS2_7.0\macro\Beam_Cap_Channel_v1.00.py

C:/SDS2_7.0\macro\Beam_Clips_v1.06.py

C:/SDS2_7.0\macro\Beam_Edge_Angle_v1.00.py

C:/SDS2_7.0\macro\Beam_Flg_Prep_Field_v1.01.py

C:/SDS2_7.0\macro\Beam_Flg_Prep_Field_v1.02.py

C:/SDS2_7.0\macro\Beam_Flg_Prep_Field_v1.03.py

C:/SDS2_7.0\macro\Beam_Flg_Prep_Field_v1.xx.py

C:/SDS2_7.0\macro\Beam_Flg_Prep_Outside_v1.01.py

C:/SDS2_7.0\macro\Beam_KickerGPL_v1.07.py

C:/SDS2_7.0\macro\Beam_NailerHoles_v1.05.py

C:/SDS2_7.0\macro\Beam_NailerHoles_v1.06.py

C:/SDS2_7.0\macro\Beam_NailerHoles_v1.07.py

C:/SDS2_7.0\macro\Beam_OutriggerPL_1.01.py

C:/SDS2_7.0\macro\Beam_RolledShapeOutrigger_v1.01.py

C:/SDS2_7.0\macro\Beam_ShearTab_v1.00.py

C:/SDS2_7.0\macro\ColumnFraming.txt

C:/SDS2_7.0\macro\Col_ErectSeat_R8.py

C:/SDS2_7.0\macro\Col_Flg_Prep_Outside_v1.02.py

C:/SDS2_7.0\macro\Col_RFStiff_v1.00.py

C:/SDS2_7.0\macro\Col_SafetyHoles_v1.05.py

C:/SDS2_7.0\macro\ConsCircle3Point.gif

C:/SDS2_7.0\macro\Const_Point_Array.py

C:/SDS2_7.0\macro\DD-TubeBeamCap.py

C:/SDS2_7.0\macro\DefaultsBeam_NailerHoles.txt

C:/SDS2_7.0\macro\DefaultsPickleVar.txt

C:/SDS2_7.0\macro\dirlist.txt

C:/SDS2_7.0\macro\EllipseLayout.txt

C:/SDS2_7.0\macro\Embed_Angle_v1.03.py

C:/SDS2_7.0\macro\Embed_Plate_v1.06.py

C:/SDS2_7.0\macro\FileDefaults.txt

C:/SDS2_7.0\macro\HoleArray1-CounterClockwise.gif

C:/SDS2_7.0\macro\HoleArray2-Clockwise.gif

C:/SDS2_7.0\macro\HoleArray3-Clockwise.gif

C:/SDS2_7.0\macro\HoleArray4-Clockwise.gif

C:/SDS2_7.0\macro\L3D.txt

C:/SDS2_7.0\macro\Marla121206.zip

C:/SDS2_7.0\macro\Member_803.pdf

C:/SDS2_7.0\macro\MemCnt.txt

C:/SDS2_7.0\macro\metaclasses-pycon.pdf

C:/SDS2_7.0\macro\MomentClip.jpg

C:/SDS2_7.0\macro\MomentClip.pdf

C:/SDS2_7.0\macro\Mtrl_Flg_Prep_Field_v1.00.py

C:/SDS2_7.0\macro\Opening_Frame_R8.py

C:/SDS2_7.0\macro\P3D.txt

C:/SDS2_7.0\macro\Plane3PConsCircle3D.txt

C:/SDS2_7.0\macro\PlaneConstArray3D.jpg

C:/SDS2_7.0\macro\PlaneConstArray3D.txt

C:/SDS2_7.0\macro\PlaneConstSpacing3D.txt

C:/SDS2_7.0\macro\Plate_radiushole_cut.jpg

C:/SDS2_7.0\macro\Plate_radius_cut.jpg

C:/SDS2_7.0\macro\PointRotate.txt

C:/SDS2_7.0\macro\PrintDict.txt

C:/SDS2_7.0\macro\PrintLocals.txt

C:/SDS2_7.0\macro\PrintPtList.txt

C:/SDS2_7.0\macro\Python_Performance.txt

C:/SDS2_7.0\macro\read_me_first.txt

C:/SDS2_7.0\macro\Rotate_About_Axis.txt

C:/SDS2_7.0\macro\SpliceFraming.txt

C:/SDS2_7.0\macro\Thumbs.db

C:/SDS2_7.0\macro\V7Beam_Cap_Channel_R2.py

C:/SDS2_7.0\macro\V7Beam_HipPlate_R2.py

C:/SDS2_7.0\macro\V7Beam_MomentClip_R1.py

C:/SDS2_7.0\macro\V7Beam_RidgePlate_R2.py

C:/SDS2_7.0\macro\V7Beam_RolledEdge_R2.py

C:/SDS2_7.0\macro\V7Beam_SagRodHoles_R2.py

C:/SDS2_7.0\macro\V7Col_BntPLConn_R3.py

C:/SDS2_7.0\macro\V7Col_SafetyHolesMark_R2.py

C:/SDS2_7.0\macro\V7Col_TopGirtClip_R3.py

C:/SDS2_7.0\macro\V7Col_WebChanBolted_R2.py

C:/SDS2_7.0\macro\V7Col_WebSpliceShims_R2.py

C:/SDS2_7.0\macro\V7Col_WebWeldThru_R2.py

C:/SDS2_7.0\macro\V7Girt_SagRodHoles_R2.py

C:/SDS2_7.0\macro\V7Hip_Roof_Geometry_R2.py

C:/SDS2_7.0\macro\V7MemberPropertiesMisc_R2.py

C:/SDS2_7.0\macro\V7Member_Count_R3.py

C:/SDS2_7.0\macro\V7Misc_RolledEdge_R2.py

C:/SDS2_7.0\macro\V7Misc_SS_R1.py

C:/SDS2_7.0\macro\__init__.py

C:/SDS2_7.0\macro\__init__.pyc

 

Root directory: C:/SDS2_7.0\macro\DD_Stuff

There are no subdirectories under directory C:/SDS2_7.0\macro\DD_Stuff

Files in directory C:/SDS2_7.0\macro\DD_Stuff:

C:/SDS2_7.0\macro\DD_Stuff\3-pointConCir.py

....................................

 

....................................

C:/SDS2_7.0\macro\Zip\VB_Hovensa.zip

C:/SDS2_7.0\macro\Zip\WallsFtgsPiers.zip

 

Root directory: C:/SDS2_7.0\macro\Zip\tem

Subdirectories under C:/SDS2_7.0\macro\Zip\tem:

tem1

 

Files in directory C:/SDS2_7.0\macro\Zip\tem:

C:/SDS2_7.0\macro\Zip\tem\dirlist_tem.txt

 

Root directory: C:/SDS2_7.0\macro\Zip\tem\tem1

There are no subdirectories under directory C:/SDS2_7.0\macro\Zip\tem\tem1

Files in directory C:/SDS2_7.0\macro\Zip\tem\tem1:

C:/SDS2_7.0\macro\Zip\tem\tem1\dirlist_tem1.txt

 

>>>

'''