Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving File from Unix to Win2000 1

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
Working with a text file created on Unix HP 11.0, I compress or gzip the file and then ftp the file using binary mode.

When I unzip the file on the Win2000 server, all of the carriage returns have been taken out of the file, make a continuous row out of a two column text file.

I have tried the following: compress, gzip tar & then gzip and tar and then compress. I have tried moving the file using Binary and ASCII. I also used the Tar file smart CR/LF conversion to know avail.

Does anyone know of a solution to this issue?
 
What application are you using to open the file in Win2000 after you get it unzipped? I frequently have trouble with files from Unix if I open them with Notepad.
 
I am using WinZip 8.0 & Notepad.
 
Does ASCII ftp on a single text file work fine?
What about using ux2dos on your text files before the transfer (ux2dos, then compression, and finally transfer in binary mode).
e.g.
Code:
ux2dos myfile >workdir/myfile
 
Try using another text editor besides notepad to open it. WordPad or Word.
 
When I open the file something other than Notepad, it appears to be correct although the LF is taken out.

Without this I cannot bcp the file into SQL Server.

Any other thoughts?
 
I'd suggest perhaps the ux2dos route. Also, how about straight ftp of the text file without the tarring/compressing?
 
The easiest way I know to fix this problem is to open the ASCII text document in the old MSDOS Editor, make a change (e.g. insert a space and then remove it) and then save the file.
This seems to insert all the original CR/LF, and then it can be opened in Notepad and the rest of Win2000 programs.
Do you need to compress/ gzip the file before coping it from Unix to Win2000?
Best regards
Jollyroger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top