How could I trim all trailing spaces from a text file using the Windows command prompt?
Go get yourself a copy of CygWin or the sed package from GnuWin32.
Then use that with the command:
sed "s/ *$//" inputFile >outputFile