If there is a test file that needs to be added, a plain text .txt generally needs to be created as well.
To run this script:
- Run
Set-ExecutionPolicy RemoteSignedORSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypassin Powershell (PS) Admin 7.0 - Have the PS script in the root of the repo
- Run
.\generate_txt.ps1 .\test_files\EXT_TYPE\FOLDER(ex..\generate_txt.ps1 .\test_files\docx\apachepoi)
*Note: When generating more .txt files after the initial execution, Word should NOT be opening.
If Word is opening, follow these steps:
There should be .skip files for the password protected documents, and Word shouldn't open twice.
Outputs that are expected from this script, are the following:
- Word should be opening and closing (to grab and save the contents as .txt)
- There should be .txt files being generated in the same folder that you ran the script
Edge cases to consider:
- The script will fail for documents that are broken (Word will prompt a notification to handle this)