DonationCoder.com Software > Post New Requests Here
Powershell Scripting : VBA adaptation code for locate strings inside word files
4wd:
I am trying to determine if the supposed eml and pdf intercepted are because or not containing the string .doc in the description ....-Contro (February 03, 2021, 11:43 AM)
--- End quote ---
That's not a description, it's a file name. Use the Comment metadata for a description.
1. I need a filter to filter what types and names I want to process-Contro (February 03, 2021, 01:30 PM)
--- End quote ---
See above:
--- Code: PowerShell ---$list = Get-ChildItem "$($srce)\*" -Include *.doc,*.docx -exclude ~*,*.mem.doc -Recurse # Add more to exclude if necessary
Edit as necessary.
2. I would like too an option to manipulate the windows registry , specially if a window appear when opening the word file.
--- End quote ---
--- Code: PowerShell ---... $wdAlertsAll = -1 # All message boxes and alerts are displayed; errors are returned to the macro. $wdAlertsMessageBox = -2 # Only message boxes are displayed; errors are trapped and returned to the macro. $wdAlertsNone = 0 # No alerts or message boxes are displayed. If a macro encounters a message box, the default value is chosen and the macro continues.... $objWord.DisplayAlerts = $wdAlertsNone # See values above...
Might work, might not.
Contro:
I put this :
$list = Get-ChildItem "$($srce)\*" -Include *.doc* -exclude ~*,*.mem.doc,~*,*.rey.doc,~*,*.CTF.doc,~*,*.anx.doc,~*,*.pry.doc,~*,*.PST.doc, -Recurse # Add more to exclude if necessary
I'll put in a few days the window I wish to deactivate and how I do throught the options in microsoft word.
:-* :P
4wd:
$list = Get-ChildItem "$($srce)\*" -Include *.doc* -exclude ~*,*.mem.doc,~*,*.rey.doc,~*,*.CTF.doc,~*,*.anx.doc,~*,*.pry.doc,~*,*.PST.doc, -Recurse # Add more to exclude if necessary
I'll put in a few days the window I wish to deactivate and how I do throught the options in microsoft word.-Contro (February 04, 2021, 12:19 PM)
--- End quote ---
Changes were already in original post, you only had to add more to exclude.
reynolds_john:
May I suggest Everything ?
I tested it on Word docx and doc and other files for content and it works brilliantly. You can configure it to just monitor particular folders if you wish, run as a service, etc. etc.
Command line supported as well.
I've used this in environments with massive (20 million)+ files and had great success too.
Best,
--J
Contro:
May I suggest Everything ?
I tested it on Word docx and doc and other files for content and it works brilliantly. You can configure it to just monitor particular folders if you wish, run as a service, etc. etc.
Command line supported as well.
I've used this in environments with massive (20 million)+ files and had great success too.
Best,
--J
-reynolds_john (February 06, 2021, 11:53 AM)
--- End quote ---
Wait for 4wd. He is my guru.
Have you tried to replace strings inside doc and docx files ?
Notepad++ and others also have the ability to search, but not to replace. Or if you replace you get a mess and a headache !!!!!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version