Solved

ftp file transfer with garbage

Posted on 2002-05-09
8
371 Views
Last Modified: 2011-09-20
The following string appeared at the beginning of a text file:

1 ˆ ‚+Â ‚!‚ €5R ÅIaRóÌ$2EOÉ     HPÔ=&|„Ã<r

For a long time I've been using one script in DOS with ftp commands to send text files from windows98 to Unix.
But yesterday and today the received file showed OK unless those strange characters.

What can be causing this addition of characters ?
Help if you know please.

Ana

0
Comment
Question by:AME
8 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7000634
see bin and ascii command of ftp
0
 

Author Comment

by:AME
ID: 7000728
ahoffmann,
the mode in use is ascii.
The running script (a batch file) is something like this:

open 999.99.99.99
user ??? ???
user ??? ???
cd ???
ascii
mput \\server\???\mainname.*
close
quit

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7000879
is it ftp from DOS to UNIX?
I suggest to use bin always.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 2

Expert Comment

by:jonnin
ID: 7005793
bin mode will replace every end of line with ^m and the like for text files. Use ascii for text files. Make sure they ARE text files, wordpad docs and word files etc are binary files.  Edit and notepad should display the files with no funny chars if the file is truly text (so will "type" from cmdline).

You could have had a noisy line, or an error on one of the file systems, or some other one time error. Try a few times and see if it happens all the time or not.


0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7005991
It can also be a network error, which you cannot help. Especially if everything worked smoothly before and this error is in there for only one time... Networks get stressed once every while.

0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 7007238
> bin mode will replace every end of line with ^m and the like for text files.
NO. please read man-pages.
bin is the only posibility to transfer a file as is, without any, more or less sophisticated (mainly wrong), conversion.

Network might also be a problem, but is unusual, 'cause ftp is a TCP protocol, which should check for network errors.
0
 
LVL 4

Expert Comment

by:newmang
ID: 7007932
I know this is obvious but have you checked the file that you are ftp'ing to make sure that the crap you see whn copting the file isn't in the original file due to some form of corruption at some stage on the source system?
0
 

Author Comment

by:AME
ID: 7008235
The cause is not yet found. Maybe a firewall had helped it.
I accept ahoffmann comment as answer.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now