File Name Problem from FTP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File Name Problem from FTP
# 1  
Old 05-12-2008
File Name Problem from FTP

Hi, there. I am new to UNIX and I am writing a script that it uses the FTP to get a list of the files from the FTP server, and compares this list with the local folder to check if the file already exists. If not exist, then it connects to the FTP server again to download the files

The problem is that the list I got from the server is in long format. That is, it includes also the permissions, the time, etc. How can I split it to get only the file name so that I can compare the list and download the file using the file name?

The command I use in the FTP side is the "ls", which is equal to "nlist".
# 2  
Old 05-12-2008
Please post your code to let us see where you're at ...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

2. UNIX for Advanced & Expert Users

problem while doing Large file transfer thru Scp and FTP

Hi , I want to transfer one file having 6GB(after compression) which is in .cpk format from one server to other server. I tried scp command as well as FTP and also split the file then transfer the files thru scp command. At last i am facing the data lost and connection lost issue. Generally it... (2 Replies)
Discussion started by: Sumit sarangi
2 Replies

3. Shell Programming and Scripting

FTP problem to find file

Hi everybody, i suddenly got in a requirement whereby: I have to create a script whereby I need to connect with a remote server with a FTP script and search whether a file named filename.txt or *.txt exists or not in the remote server. If it exists then my script has to return a value. ... (18 Replies)
Discussion started by: RubinPat
18 Replies

4. Shell Programming and Scripting

Problem in redirecting ftp msgs to a log file

Hi all.. The following set of statements is used in a shell script to ftp a file to a remote machine I want to redirect the ftp messages thrown by the first ftp statement to a log file. As you can see there is a logic downstream to decide if the ftp was a success or not. But i am not... (5 Replies)
Discussion started by: hareeshkumaru
5 Replies

5. UNIX for Advanced & Expert Users

Problem in FTP of file with chinese chars

Hi, I have a file in my PC with Chinese (PRC) characters. When I transfer that file into my AIX5.3 server through FTP, I get junk characters instead of Chinese chars. Last week I copied the content from my notepad and pasted in vi editor. The Chinese characters were correct, but when I try now,... (4 Replies)
Discussion started by: carthyc
4 Replies

6. UNIX for Dummies Questions & Answers

UNIX FTP file problem

Hi, I am new to this forum. I have a problem and I ws hoping you guys can help me out here. the problem: I have a batch job running on a Unix Server, and it transfers files from the unix server to another server. the series of commands are as follows: > LS Listing the files > Logging into... (4 Replies)
Discussion started by: Vanilmirth
4 Replies

7. UNIX for Advanced & Expert Users

Large file FTP problem

We are experiencing a problem on a lengthy data transfer by FTP through a firewall. Since there are two ports in use on a ftp transfer (data and control), one sits idle while the other's transfering data. The idle port (control) will get timed out and the data transfer won't know that it's... (3 Replies)
Discussion started by: rprajendran
3 Replies

8. UNIX for Dummies Questions & Answers

problem while making ftp of a large file

Hi Friends, I'mfacing a problem while doing ftp of a large file.The control session is getting closed after sometime.But data session transfers the file successfully even when the control seeion is lost.I need to make the control session available as long as data session is active. How can i... (1 Reply)
Discussion started by: rprajendran
1 Replies

9. Ubuntu

Debian (ubuntu) file problem after ftp

Hi, I am using Debian (ubuntu). whenever I ftp file from Windows to Debian, the file is being shown as DOS while editing in vi. The control characters are not visible and I couldn't remove the '^M' character. So please help me how to make it Linux specific file to use it for Linux specific tasks. (4 Replies)
Discussion started by: royalibrahim
4 Replies

10. Shell Programming and Scripting

ftp UnixWare File Size Problem

Hi Engg. ! :cool: When I am trafering a file through ftp from windows to UNIX having size about 1.24 GB then at the end of file transfer I got a error message "Extended file size limit (coredump)" and finnally ftp stop, whenever on other UNIX server the same file from windows... (1 Reply)
Discussion started by: Niraj Gopal Sha
1 Replies
Login or Register to Ask a Question