Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

auto path ? recurse subdirectories?

puppet

Moderator
Hi,
Is there a way to get pro to search deeper into the dirctory tree for files in a assembly, without having to manualy set the specific path? something like

"recurse subdirectories yes"


ie
assembly_a c:\ass1
sub_Ass_1 c:\ass1\sub1
sub_Ass_2 c:\ass1\sub2
sub_ass_3 c:\ass1\sub3


right now if i was to load assembly_a, it fails to find the file "sub_ass_1" etc and then i just manually point it to where the file is.

i know i can add the lines

search_path c:\ass1\sub1 .. etc

to my config.pro. but this is not what i am after.

this is just for the sake of being neat. and no i dont have intralink.
 
I don't think the developers have offered a solution to that yet. I could be mistaken. Here's a quick way to generate a search.pro file without all the typing though (you'll have to translate this to unix commands if you're not on Windows):


1) Run a command shell (Start / Run / cmd )


2) Change directory to the top of the tree you want to search down.


3) Execute the following: dir /ad /s /b > search.pro


This does a directory listing (dir) of only the directories (/ad) and subdirectories (/s) in a bare format (/b) and writes it to a file (>)named search.pro. Now you can move this file (or cut and paste the list into your real search.pro).


PS. And I guess if you are adding/changing these directories with any regularity, you might put this into you proe batch file to dynamically generate the search.pro...


<tg>



Edited by: telecomguy
 
hey telecomguy.
is there a way with that batch file to make it add "search_path" infront of every line?
 
From a command line:
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
for /f "delims=" %a in ('dir /ad /s /b') do echo search_path %a >> search.pro</BLOCKQUOTE>


To run that in a batch file, replace % with %%


-Brian
Edited by: Brian_Adkins
 

Sponsor

Back
Top