Question : Batch file to remove whitespace - similar to word replace ^w

Hi,

I have a csv file that is created from another program.  It will not import into Excel correctly with a double click open (all columns for the record are in one column, ignoring my comma delimiter).  In trying to resolve this on my own, I have found that the replace whitespace option in Word (replace ^w with nothing) seems to be the answer.  I copy the results into a file and then I can save as CSV and open the file in Excel with a double click.  Is there a way to write a batch file to do the replace whitespace option instead of using Word and copy/paste the file?

Thank you.

Answer : Batch file to remove whitespace - similar to word replace ^w

Give this a try.  Save it as a .bat file and put it in the directory where your csvs are.
1:
2:
3:
4:
5:
6:
@echo off
set file=%date:~10,4%%date:~4,2%%date:~7,2%_sample.csv
type %file%>tmp.csv
del %file%
ren tmp.csv %file%
%file%
Random Solutions  
 
programming4us programming4us