## PATH for Open File dialog?

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

### PATH for Open File dialog?

Is there any way to set up UE to search through a defined path in the Open File dialog? For example, if I have a path such as .:src:src/inc, I'd like UE to look in ".", then "src", then "src/inc" for the file.

Thanks,
Steve
sroberts
Newbie

Posts: 3
Joined: Wed Sep 10, 2008 1:58 pm

### Re: PATH for Open File dialog?

So you want to specify what is the current working directory for UltraEdit?

There are several options how UltraEdit should handle the current working directory. See

Advanced - Configuration - File Handling - Load
Advanced - Configuration - Directories

and read the help for these 2 configuration dialogs.

And when a project is open, the specified project directory in the project settings is also taken into consideration to find a file with a relative path - see help page titled Output Window command.

Mofi
Grand Master

Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

### Re: PATH for Open File dialog?

Thanks Mofi, but it isn't the current directory I need to specify, it is an actual PATH list. So if I hit File / Open, and type "foo.inc", if the actual file is ".\inc\foo.inc" and my PATH is ".:inc", I'd like to just specify "foo.inc" and have UE find the file. My example sounds trivial but I am working on a system that uses thousands of files and a PATH of about 20 dirs. to invoke code - so I'm constantly having to search for files in the OS before I can tell UE where to find them.

Steve
sroberts
Newbie

Posts: 3
Joined: Wed Sep 10, 2008 1:58 pm

### Re: PATH for Open File dialog?

No UE (Windows) is not able to search multiple relative or even absolute file paths for a file in the file open dialog.

But I have a project with source code scattered across several folders. So I made a small script to easily open files from the desired folder. But my luck is that specific extensions is placed in certain folders so depending on the file name I know which folder to open from.

Here is a simplified version of my script:

Code: Select all
`var myRootPath = "C:\\MyProject\\";var selectProgram;if (UltraEdit.activeDocument.isSel()) {  selectProgram = UltraEdit.activeDocument.selection;}else {  selectProgram = UltraEdit.getString("Enter filename to open:",1);}if (selectProgram.length==0) {  // no filename entered or selected}else {  if (selectProgram.indexOf(".jsp") > 0) {    UltraEdit.open(myRootPath+"jsp\\"+selectProgram);  }  else {    if ((selectProgram.indexOf(".java") > 0) || (selectProgram.indexOf(".class") > 0)) {      selectProgram = selectProgram.replace(".class",".java");      UltraEdit.open(myRootPath+"java\\"+selectProgram);    }    else {      UltraEdit.open(myRootPath+"misc\\"+selectProgram);    }  }}`

jorrasdk
Master

Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark