In Windows, the approach is to go with a greedy search (or deletion to be more precise). If you’re wondering what’s happening here, think regular expressions. We are looking for any file (/s) in any of the subdirectories in the specified path, and we’re looking for a file that has zero or more trailing whitespace characters. Boom. Job done, no more ugliness.
In plaats van:
del /s \\?\D:\Scans\Xerox_Scan.
Gebruik:
Deleted file – \\?\D:\Scans\Xerox_Scan.