I have PowerShell 4.0. My question is that have 10 folders and each folders contain 300 text files. Out of 300 text files, there are almost 150 files that are empty but have unique special character. I open each of the file with Notepad++ and the character is "EXTNULL". I open with Notepad and the character is like "L". I can't load them because of that.
How could I remove the special characters using PowerShell 4.0?
The folders are like this:
C:/temp/file1_extracted c:/temp/file2_extracted c:/temp/file3_extracted ... c:/temp/file10_extracted
This Format-Hex is working in Powershell 5.0 and above but I have 4.0
Get-Content -path "C:\temp\file1_extracted\file1.txt" | Format-Hex
Here is the symbol for the special characters:
Offset Bytes Path
------ ----- ----
0 {3, 0}