Export content from Windows explorer search
zef,
If want copy all PDF documents content to a TXT file you can use this:
Via command line, open cmd.exe
and type:
FOR %1 in (Documents\*.pdf) DO echo f | xcopy "%1" "%~dp1new-files\%~n1.txt"
- Assuming your terminal opens in the following folder: C:\Users\zef\
- This will do a loop search on your wanted folder only for PDF files
- Make a copy to
your_folder/new-files/
and rename to.txt
- This, only searches and rename your PDF to TXT file, it's not a conversion
- If you want convert you need a 3rd party application to do this, like GhostScript
Reference:
- https://ss64.com/nt/syntax-args.html
- How to copy a file to a directory in DOS, and create directories if necessary?
- https://stackoverflow.com/questions/30651776/xcopy-returns-error-invalid-number-of-parameters-when-exclude-parameter-is-set
- https://stackoverflow.com/questions/11192039/how-to-do-a-for-loop-in-windows-command-line
If want just a list of your results:
- Open Windows Explorer and search for what you want
- When the search results populate, select all
(Ctrl + A)
- Hold the Shift key and Right Click on the search results
- Select
"Copy as Path"
(this option only shows up when you hold shift before the right click) - Paste into a notepad window, Excel spreadsheet, etc...
The results will be formatted as:
"\path\to\first\item"
"\path\to\second\item"
Via command line, open cmd.exe
and type:
dir C:\Users\zef\Documents\*.pdf" /s /b > result.txt
Reference: social.msdn.microsoft.com/Forums/
Related videos on Youtube
zef
Updated on September 18, 2022Comments
-
zef over 1 year
When I do a search in Windows Explorer (Windows10) in a directory with many PDF documents I get the results giving me in the first column the file name and in the second column the path and a a preview of part of the content. When I hover over the content part more information is shown on the content.
I suppose this means the content of the PDF files is somehow indexed.
I would now like to export this content information from the search result (including or not the path and filename) to a text file or xls.
I would like to export the content information for all files in the search in one go.
Is it possible to do this from Windows explorer or in some other way?
-
zef over 6 yearsRafael this only prints the path and filenames. I am looking for a way to copy the content part behind the filename to a txt file.