DATA Step, Macro, Functions and more

How do I search for a keyword in a.sas file using microsoft explorer windows 10

Reply
Learner
Posts: 1

How do I search for a keyword in a.sas file using microsoft explorer windows 10

How do I search for a keyword in a.sas file using microsoft explorer using windows 10?

 

Problem:  I need to find all SAS programs with a specific keyword in them.

 

So I am trying to search a SAS program (files with a .sas extension) using windows explorer in windows 10.  Windows explorer can't find them.  This has been the case in many versions of windows for as long as I can remember.  The solution used to be to "Add aregistry key" that made Microsoft play nice with SAS. 

Can software be added to the SAS install process to do this?

Super User
Super User
Posts: 6,500

Re: How do I search for a keyword in a.sas file using microsoft explorer windows 10

I suspect that it is the same setting the let's OUTLOOK preview SAS programs.

 

https://communities.sas.com/t5/Base-SAS-Programming/Allow-OUTLOOK-to-preview-attached-SAS-programs/m...

 

Super User
Posts: 10,500

Re: How do I search for a keyword in a.sas file using microsoft explorer windows 10

Don't know about Windows 10 but in earlier versions of Windows Explorer go to Tools>Folder Options>Search and look for an option like "Always search file names and contents" and set that option . Then the Apply button. It seems if this is done at the "Computer" level it propigates to the system.

And when it says "may take minutes" they aren't joking. So if you don't know which folder to start in and are searching with "Include subfolders" option it can take a long time to search every file of every subfolder.

 

OR make sure that every single folder is always "indexed".

Frequent Contributor
Posts: 82

Re: How do I search for a keyword in a.sas file using microsoft explorer windows 10

If your on a fairly updated version of Windows 10 and also have familiarity with Linux/UNIX tools or prefer them like I do, then you can take advantage of the Windows 10 feature to run Bash on Ubuntu on Windows 10.  I played around with this on my personal PC and thought it was quite handy, unfortunately my work PC isn't on Win10 yet so I'm using CygWin, which also lets me use tools like grep to search for keywords.  If you're not a Linux person, this may not be helpful, but I thought I'd pass it along.

PROC Star
Posts: 1,561

Re: How do I search for a keyword in a.sas file using microsoft explorer windows 10

[ Edited ]

Microsoft, in their wisdom, created the Advanced Query Syntax (curse them!) to look for files having certain characteristics or contents, rather than XP's unreliable search menu.

Sadly it is even worse and doesn't work too well; but that's all you have to use in the Windows explorer.

Look for AQS tutorials online.

A much better option is to search using a SAS program if you can. Or bash. Or any other program.

 

 

 

 

Ask a Question
Discussion stats
  • 4 replies
  • 115 views
  • 0 likes
  • 5 in conversation