mget command issues


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mget command issues
# 1  
Old 01-25-2011
mget command issues

Hi
I am trying to get 3 files sitting on a FTP server to an application server.

All 3 files are .csv files. I am using mget *.csv and it transfers only 2 files.

the 3 files contain a common word in their file names "Report". I tried
mget *Report*.csv and that gets me 2 files as well.

Anyone know of any issues/limitations with mget

Thanks
# 2  
Old 01-25-2011
Tried other wildcards?

Is it always the same file left behind?

Can you mget Report*.* ?
--> does this get that file
# 3  
Old 01-25-2011
Yeah. Its always the same file that is left out.

I tried using mget *Report*.* and a interesting thing happened.

Let me summarize how the files are on the FTP server.

abc_Report_1.csv
abc_Report_1.xls
abc_Report_2.xls
abc_Report_1.xlsx
def_Report_1.csv
def_Report_1.xls
def_Report_2.xls
def_Report_1.xlsx
xyz_Report_1.csv
xyz_Report_1.xls
xyz_Report_2.xls

when I had the script with "mget *Report*.csv", I got the results as
abc_Report_1.csv
def_Report_1.csv

I tried *Report*.* and I got
abc_Report_1.csv
abc_Report_1.xls
abc_Report_2.xls

Any thoughts??
# 4  
Old 01-25-2011
1) Please post "the script". We'll need to check which program is expanding the asterisks (Shell or FTP ?).

2) If you have Shell access on the FTP server, while in the target directory please post the output from these commands which are designed to make invisible characters visible:
Code:
ls -lab
ls -la | sed -n l

Please always post directory listings, program code and program output in CODE tags.

3) What Operating Systems and versions are you running on the source and target servers?

4) What Shell do you use?

5) If you are using anything other than the "ftp" which comes with your Operating System please specify what FTP package you have installed.

6) Do any of the filenames contain space characters or other non-alphanumeric characters, or are any of the filenames very long? It is easy to create a file on a unix or MSDOS computer which has a name which is invalid in FTP.

Last edited by methyl; 01-25-2011 at 08:11 PM.. Reason: Afterthough 6)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to specify more then one pattern in a single mget statement of ftp command?

hi, i am using ftp command to get some files from a remote server. if the remote server contains files of different extension. abc.txt def.txt ghi.lst jkl.cnf is it possible to get all the three type of files in one ftp? i am using this ftp command $FTP $Remote_server <<_FTP1 ... (4 Replies)
Discussion started by: Little
4 Replies

2. Shell Programming and Scripting

Unix Mget command issue

Hi, I am facing an issue with mget command, below are the details The following commands are in a batch file "abc.ctl" cd /mypath/mydirectory/ mget 'MYFILE_*.touch' bye I use this file as a parameter for an sftp command sftp -b abc.ctl -oIdentityFile=$myserver -oPort=$myport >>... (0 Replies)
Discussion started by: saurabh_mh
0 Replies

3. UNIX for Dummies Questions & Answers

If then else in with mget command

Hi Friends, I need to use if then else logic with the mget command.I need to check if {JOURNAL_CODE}*_1_Audit*.txt exists then download it (using mget)and if not then leave it.Same for the {JOURNAL_CODE}*_2_Audit*.txt file.Can you please tell me how can i achive that? sftp -b -... (3 Replies)
Discussion started by: Param0073
3 Replies

4. UNIX for Dummies Questions & Answers

Issues I'm having with the Find Command

:confused: I've been trying to display all my files in my /tmp directory when I'm in it. I just can't get the darn find command working... And I've been trying to look at my /tmp directory on my home directory and I know I'm messing something up there.. Another issue I had while back but... (12 Replies)
Discussion started by: curtner
12 Replies

5. Shell Programming and Scripting

kill command issues

xxxxxx (8 Replies)
Discussion started by: kitty123
8 Replies

6. Shell Programming and Scripting

mget ftp command options

Hi, I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows. -rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip -rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip -rw------- 1 autosys ... (1 Reply)
Discussion started by: spatra
1 Replies

7. UNIX for Advanced & Expert Users

mget ftp command options

Hi, I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows. -rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip -rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip -rw------- 1 autosys autosys 14592 Aug 19... (1 Reply)
Discussion started by: spatra
1 Replies

8. Shell Programming and Scripting

mget command

Hi All, I am using mget (mget server.*) through ftp... ... i dont want to overwrite the files in my localmachine if it is already exists... is it possible through ftp ?? any other optios also mos t welcome Thnks in advance (4 Replies)
Discussion started by: scorpio
4 Replies

9. Shell Programming and Scripting

Is there a limit to mget command?

Hi All, I am using a csh ftp to get all the relevant files i need. When i reduce the number of file to 4 (which is aaa,bbb,ccc,ddd), the script manage to get all the files i need. But when i add "eee" to the mget command, it doesn;t seem to get any files at all. Is there a limit to how many... (0 Replies)
Discussion started by: Raynon
0 Replies

10. UNIX for Dummies Questions & Answers

mget (ftp command)

hey, I was wondering if its possible to use a complete path and file name using the mget command example mget /dir1/dir2/dir3/file.ext or get /dir1/dir2/dir3/file.ext because whenever i try its says file not found or permission denied..... but if i do cd dir1 cd dir2 cd dir3 mget... (2 Replies)
Discussion started by: Ganondorf
2 Replies
Login or Register to Ask a Question