Difference between revisions of "CycleThruDir"
From scripting
(Created page with " CycleThruDir "C:/MyProjects/Project1/DateModel/SubDir1/OBJ/" 0; global proc CycleThruDir(string $PathStr, int $SubRecBool) { //string $PathStr = "F:/0001dProj/"; if...") |
(No difference)
|
Latest revision as of 05:21, 22 April 2017
CycleThruDir "C:/MyProjects/Project1/DateModel/SubDir1/OBJ/" 0; global proc CycleThruDir(string $PathStr, int $SubRecBool) { //string $PathStr = "F:/0001dProj/"; if ($SubRecBool == 1) { string $FolderList[] = `getFileList -folder $PathStr`; for ($x=0;$x<size($FolderList);$x++) { string $CurFolder = $FolderList[$x]; string $CurPath = $PathStr + $CurFolder + "/"; CycleThruDir $CurPath $SubRecBool; } } string $FileList[] = `getFileList -folder $PathStr -filespec "*.igs"`; for ($y=0;$y<size($FileList);$y++) { print ("Importing File: " + $FileList[$y] + "\n"); string $CurIGS = $PathStr + $FileList[$y]; string $buffer[]; $numTokens = `tokenize $FileList[$y] "." $buffer`; file -import -type "IGES" -rpr $buffer[0] $CurIGS; } }
More information of files and strings, read pages 28-37, 56-58 in YSYT.