I need help in finding all files that include a SPACE (blank space) before the actual file name.
Please note that the Files listed below show File Number 1 & File Number 5 to have a SPACE (blank space) before the file name. I used the underline to show the space before the filename as a placeholder since the space cannot be seen when submitting this question:
_File Number 1.txt
File Number 2.txt
File Number 3.txt
File Number 4.txt
_File Number 5.txt
I will need to find all files that have spaces before the file name and export to a list.
I know the following command is wrong, but it’s what i have so far:
Thanks for the help. But it did not work Unless I’m doing something wrong. I’ve included the string just like you described (IN THE CORRECT SPACE):
where {($_.name).toSubString(1) -eq (regex to space)
I cannot seem to find anything online like what it is I’m asking for. You would think this is a common request, especially in an enterprise environment.