maximus1974
asked on
Need script to search multiple files in one drive
Need a script that will allow me to search for all the PO's in the attached file. I need to search for files in a complete drive that contain the PO numbers within files.
ex. *25884*
Any help will be greatly appreciated.
Copy-of-refs-for-MIS.xlsx
ex. *25884*
Any help will be greatly appreciated.
Copy-of-refs-for-MIS.xlsx
Also, What kind of output are you expecting...
The filename that has all the POs? The line data that contains the PO number?
This information may help if scripting is needed.
The filename that has all the POs? The line data that contains the PO number?
This information may help if scripting is needed.
I use Windows Explorer to search for files as it is universal (as noted by Brian above).
From a command prompt: FIND (FIND /?) can find text within files. You need to know which folder, however.
From a command prompt: FIND (FIND /?) can find text within files. You need to know which folder, however.
ASKER
Thank you for the responses. I need to find all files that contain the PO numbers lite din the sheet attached.
Ex. 25889
I need to find all files that contain *25889*. some files were named using "PO 25889", some "PO 25889-1A" in different folders. It would be best to search the whole Drive "E" for all files. How would i do that using Windows Explorer configuring the settings Brian suggested?
Ex. 25889
I need to find all files that contain *25889*. some files were named using "PO 25889", some "PO 25889-1A" in different folders. It would be best to search the whole Drive "E" for all files. How would i do that using Windows Explorer configuring the settings Brian suggested?
ASKER
As you can see, I need to search for 19000+ PO's. I cannot search for them one at a time.
It is best that the Windows Index be up to date, but otherwise open Windows Explorer and go the top right search bar. Enter your search terms here. There is an advanced search and you can work from the top folder.
ASKER
John, I cannot enter more than one PO at one time using Windows explorer. I need a way to search for all PO at the same time on the entire Server.
You need to get a third party search solution. Windows does not do what you want natively
Maximus,
I use a program called agent ransack. Its free and does just that if you specify OR in the clause.
If you need something specific in output you should let us know as well.
I use a program called agent ransack. Its free and does just that if you specify OR in the clause.
If you need something specific in output you should let us know as well.
No need to reinvent the wheel here guys. This script from the PowerShell gallery seems like it should work:
https://www.powershellgallery.com/packages/PSExcel/1.0/Content/Search-CellValue.ps1
https://www.powershellgallery.com/packages/PSExcel/1.0/Content/Search-CellValue.ps1
Jason, I don't see that function supporting an OR clause...
ASKER
Thanks Brian. I installed Ransack. When you say OR in the clause, you mean like the screenshot attached?
Capture.PNG
Capture.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is a link that demonstrates how to do just this using windows find.
http://www.wikihow.com/Mak