FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 12th, 2011, 10:13 PM
kazeopeia kazeopeia is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Posts: 2 kazeopeia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 37 sec
Reputation Power: 0
Question FTP Put a zip file that contains text files in Linux

Hi all,

I am transferring a file from a linux pc going to a windows ftp server using "ftp put". My file is a zip file that includes .txt files inside it.

Here is what's happening when I transfered this file :
1. I used ftp put for transferring and found that my transferred zip file was corrupted and couldn't be opened on the ftp server.
2. I found the solution for this on the internet. I needed to use 'binary' to make it right.
3. I transferred again using binary and then ftp put the zip file onto the other end. Yes, it worked. My zip file wasn't corrupted anymore and I could already opened it on the ftp server. But the problem remains on the .txt files inside it. Converting the file into binary made my .txt files to be distorted and unreadable. I read from the internet that .txt files need to use Ascii instead of Binary to be readable, but if I use ascii it would cause my zip file to be corrupted again.

Is there any way to solve this? I need to successfully transfer a zip file that contains .txt files using ftp put.

Please help.
Thank you very much for any quick and kind response.

Reply With Quote
  #2  
Old September 16th, 2011, 07:43 PM
inky2k inky2k is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Posts: 7 inky2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 20 m 15 sec
Reputation Power: 0
Hello,

You are doing right with binary mode for zip file.

On linux & windows different line breaks (carriage returns) being used, so it must be converted by special utility (unix2dos/dos2unix) or uploaded to ftp server on ascii mode (i mean your txt files).

Hope it help you.

P.S.
you can always use mput command to send all your files - for example mput *

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP Put a zip file that contains text files in Linux

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap