Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

script to search for the string within files vs. within filenames.

$
0
0

Hi Experts,

I am looking for a power shell cmdlet or script to perform a search against a network drive for the term "xxxxx". XXX could be any string or sentence defined as criteria of the search. I want to export the results to a CSV, txt or maybe something else that can be read

The network drive mapped to my laptop is Q drive, and contains dozens of sub-folders and folders

Just to clarify I want to search for the string within a file and also within a file name or search for the occurrence of the text in the filename and within any word, txt or pdf file under my folder structure on network drive

We need to search within word doc, text based PDF extra across multiple folders and subfolders on Q drive. so to recap, the search for the string will be in the filename and within every single word &PDF file under the tree folder structure on Q drive

Quick Example

P Drive\

\IT Folder root

\Public Folder   \Private Folder

\\ Public Folder\Sub folder 1.. n\ file 1.. n

\\Private Folder\Sub folder 1..n \file 1..n
.. so on

Any ideas?


Franki


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>