Find in .sas files without also finding in .sas7bdat files?

Find, replace, find in files, replace in files, regular expressions

Find in .sas files without also finding in .sas7bdat files?

Postby rpardee » Fri Sep 30, 2005 6:16 pm

Hey All,

If I do a find-in-files and specify *.sas as the "in files/types" part of the dialog, UE will search through files whose extensions only *start* with 'sas'. So it's as if I typed *.sas* as the type. I don't want this--is there a way to change this behavior?

Thanks!

-Roy
User avatar
rpardee
Basic User
Basic User
 
Posts: 14
Joined: Sun Sep 19, 2004 11:00 pm

Re: Find in .sas files without also finding in .sas7bdat files?

Postby Mofi » Sat Oct 01, 2005 9:18 am

That is not a problem of UltraEdit, it is a windows problem. If you don't believe me, try dir *.sas at a command prompt. The reason is the 8.3 short file name format for compatibility issues.

A file like test.sas7bdat has in 8.3 format the name test~1.sas. So the windows kernel functions FindOpen, FindFirst and FindNext always also returns *.sas7bdat files to the calling procedure, because the short file name extension for such files is *.sas.

For more about this problem read the article at
http://www.codeguru.com/Cpp/W-P/files/a ... php/c4441/

Currently there is no workaround for your problem. You can only write to IDM an e-mail and ask for an additional find result filter inside UltraEdit like the code example on the article above demonstrates.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4058
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Find in .sas files without also finding in .sas7bdat files?

Postby rpardee » Sat Oct 01, 2005 8:09 pm

Interesting--thanks for the link. I think it's reasonable to ask for an additional filter in UE--that's a heck of a trap for the unwary.

It would stink to try and actually *replace* in files and specify *.sas as the file type. .SAS files are plain text scripts, but .sas7bdat files are binaries. I bet you could hose those up pretty easily by trying to insert text in them.

Cheers,

-Roy
User avatar
rpardee
Basic User
Basic User
 
Posts: 14
Joined: Sun Sep 19, 2004 11:00 pm


Return to Find/Replace/Regular Expressions