FTP Convert binary file to ASCII

I am uploading a file.  User needs the file in ASCII format.  Whenever I upload I receive the below error.

550-RMS WRITE RTB record too large.
550 !UL byte record too large for user's buffer

If I upload in Binary there is no error.

Is there a way to upload or convert the file in its location to ASCII?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Paul MacDonaldDirector, Information SystemsCommented:
BIN and ASCII are just transfer modes.  They have no effect on the file itself.  In other words, if you transmit in Binary, the user can still open the file just fine.
CipherISAuthor Commented:
Unfortunately there is a process that is trying to pick up the file and it needs it in ASCII.
Fernando SotoRetiredCommented:
That all depends if you know how it was place in binary format. For example a native executable is a binary file but you can not just convert it to ASCII. If you were to serialize a object in C#/VB .Net to a binary format into a file you could not just apply some template to convert it to ASCII you would need to use the same object model to deserialize it back to the object in a program.

So do you know how the binary file was created?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

☠ MASQ ☠Commented:
Which client are you using?
In FileZilla there's a menu option but also a quick select at the bottom of the screen when you are connected to the server
Default settingSelect mode
Paul MacDonaldDirector, Information SystemsCommented:
You don't understand Binary mode will work for any type of data.  You simply cannot go wrong transferring the data in Binary mode.  It will not magically change your ASCII text file into a GIF or something.  

Seriously.  Give it a try.
☠ MASQ ☠Commented:

"When files are transferred in ASCII mode, the transferred data is considered to contain only ASCII formatted text. The party that is receiving the transferred data is responsible for translating the format of the received text to one that is compatible with their operating system. The most common example of how this is applied pertains to the way Windows and UNIX handle newlines. On a Windows computer, pressing the "enter" key inserts two characters in an ASCII text document - a carriage return (which places the cursor at the beginning of the line) and a line feed (which places the cursor on the line below the current one). On UNIX systems, only a line feed is used. ASCII text formatted for use on UNIX systems does not display properly when viewed on a Windows system and vice versa.

Binary mode refers to transferring files as a binary stream of data. Where ASCII mode may use special control characters to format data, binary mode transmits the raw bytes of the file being transferred. In binary mode, the file is transferred in its exact original form."
CipherISAuthor Commented:
@paulmacd we have tried it in Binary and the system has to be reset.
What is in the file before the transfer, and what do you want the file to contain after the transfer?
CipherISAuthor Commented:
Just needed in ASCII format.  Unsure what the file is before the transfer.
What do you mean by "ASCII format"?
Do you want to remove all characters that are not in the range \0 - \177 ?
Bernard S.CTOCommented:
Could you manage to post here the same file in both formats?

As pointed above:
- this ASCII/bin thing is just an option in your ftp client (which one do you use?
- if there are differences, and unless you have selected (probably unwantedly) some verys strange option, the only possible differences should be in the end-of-line area

- another explanation to your problem might be the program you are using after the transfer: it might search for a very precise string of bytes, and shout "binary! binary" as soon as it does not find them. can you give us more information on this program?
550-RMS WRITE RTB record too large.
550 !UL byte record too large for user's buffer
because of the above error messages, it is is considerable clear, that reading the the input file in ascii mode leads to a stream of 550 bytes while the buffer to receive this is smaller (likely 512 bytes only). there are few reasonable explanations for this. one is that the file was read line by line in ascii mode but either isn't a text file with linefeed bytes or the line length of text line was greater than the maximum possible. another possible reason is that each byte of the binary stream was converted to a two-bytes hex string (ascii) what finally leads to a bigger record as supported.

regardless of the real cause, it is obvious that you can't use the "ascii mode" while reading the data but have to use the working binary mode to get the data in the first case and store them to a file. in a second step you can convert the file to ascii. that can be very trivial if you look at the binary file using an hex editor and ask your User how they expect the ascii data from this.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.