ftp zip files corruption


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp zip files corruption
# 1  
Old 08-02-2007
ftp zip files corruption

Hi

I have a zip file that I am ftping to another server. After I have ztped the file it is corrupt and cannot be opened by winzip.

Can anyone throw any light on to why this would happen.

I have no problems with sending the individual files, but when zipped into one file it becomes corrupt.

Cheers
Gary
# 2  
Old 08-02-2007
try binary transfer mode.
# 3  
Old 08-02-2007
How do I set it to binary?

I am doing the below at the moment.

echo "open $FTP_MACHINE" > $tmpcmd
echo "user $FTP_USER $FTP_PWD" >> $tmpcmd
echo "put *.zip" >> $tmpcmd
echo "bye" >> $tmpcmd

ftp -n -v < $tmpcmd > ${tmpcmd}.out

Cheers
Gary
# 4  
Old 08-02-2007
put in "bi"


Quote:
Originally Posted by colesga
How do I set it to binary?

I am doing the below at the moment.

echo "open $FTP_MACHINE" > $tmpcmd
echo "user $FTP_USER $FTP_PWD" >> $tmpcmd
echo "bi" >> $tmpcmd <<<<<-----this should do it.
echo "put *.zip" >> $tmpcmd
echo "bye" >> $tmpcmd

ftp -n -v < $tmpcmd > ${tmpcmd}.out

Cheers
Gary
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with Zip and FTP Shell Script

I am trying to combine zip and ftp upload in one script but for some reason I can't get it to work. It zips properly but does not ftp, seems like it just ignores ftp. Any help would be greatly appreciated. Thanks! #!/bin/sh cd /home/user/test zip -r test.zip * FOLDER='/home/user/test'... (2 Replies)
Discussion started by: shimabuku
2 Replies

2. Shell Programming and Scripting

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies

3. UNIX for Beginners Questions & Answers

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies

4. Shell Programming and Scripting

Zip and ftp script?

Hello, I am looking for a script to zip some folders and ftp the zip files automatically, is there a script already written somewhere or can someone help me start to write one? thanks a lot (24 Replies)
Discussion started by: bashex
24 Replies

5. Shell Programming and Scripting

Zip Multiple files to One .zip file in AIX system

Hi I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want. One I do .zip file, I should be able to unzip in my local Computer. Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies

6. Shell Programming and Scripting

zip the folder and loaded to ftp

Hi , I am working on a script which will do the below things 1) It will checkout from the repository 2) then zip that checkout stuff 3) and put the zip folder to FTP server Here my question is I am able to checkout successfully through this coomand svn co... (2 Replies)
Discussion started by: rohit22hamirpur
2 Replies

7. AIX

ZIP multiple files and also specify size of zip file

I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created. How we can achieve this in UNIX? I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies

8. UNIX for Dummies Questions & Answers

extract rar/zip files from pc DIRECTLY on xbox (FTP)

Hello I've an old xbox connected to Ubuntu 8.04 with an ethernet cable. I use gFTP to transfer files on xbox (through FTP). When I have to transfer a rar file, first of all I have to extract it on ubuntu, then on xbox. I would like to transfer rar files directly on xbox. Is it possible with... (4 Replies)
Discussion started by: paolobitta
4 Replies

9. UNIX for Dummies Questions & Answers

unzip .zip file and list the files included in the .zip archive

Hello, I am trying to return the name of the resulting file from a .zip archive file using unix unzip command. unzip c07212007.cef7081.zip Archive: c07212007.cef7081.zip SecureZIP for z/OS by PKWARE inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00 I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies

10. UNIX for Advanced & Expert Users

data corruption with ftp transfer

Hi again, first of all thanks for you help on my last problem, the problem is solved now. But I have many problem :) This time, I transfered a big file, ~3,5 GByte, with ftp from a Sun machine to a linux box, RedHat 7.3. But the file recieved on the Linux Box is corrupt, with smaller files... (12 Replies)
Discussion started by: malcom
12 Replies
Login or Register to Ask a Question