Migrate text files to windows
Hi! I'm writing a backup script that creates an index (in a text file) of all the files that have been backed up. The problem I have is that when this file is opened on Windows with notepad (or other wordprocessors), it combines different lines together and uses some strange characters to replace newline. I would appreciate if I can get any useful links or some help on how to retain the structure of the file i.e. it should show the same way it would on my Linux.
SAMPLE:
On my linux machine
$ cat index_file.txt
/home/ayo/mp3/david_lanz/classical_jazz/01_track_01.mp3
/home/ayo/mp3/david_lanz/classical_jazz/04_track_04.mp3
/home/ayo/mp3/david_lanz/classical_jazz/05_track_05.mp3
/home/ayo/mp3/david_lanz/classical_jazz/02_track_02.mp3
/home/ayo/mp3/david_lanz/classical_jazz/03_track_03.mp3
/home/ayo/mp3/david_lanz/classical_jazz/09_track_09.mp3
/home/ayo/mp3/david_lanz/classical_jazz/10_track_10.mp3
/home/ayo/mp3/david_lanz/classical_jazz/06_track_06.mp3
/home/ayo/mp3/david_lanz/classical_jazz/07_track_07.mp3
/home/ayo/mp3/david_lanz/classical_jazz/08_track_08.mp3
/home/ayo/mp3/david_lanz/classical_jazz/11_track_11.mp3
On windows, it joins most of the lines together and replaces the newline with funny boxes.
|