mdelete command in FTP


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mdelete command in FTP
# 1  
Old 07-21-2008
mdelete command in FTP

What I need to do is ftp some files on a remote server, but before postong the file need to delete any existing file from the path on the remote dir.

I am using the mdelete command for the same as follows :

open server_name
user_id
password
prompt off
ascii
cd /test
mdelete *

IF the files exist on the test dir, this works fine, but if no files are present then I am getting the following message :

"ftp> mdelete *
Bad directory components
can't find list of remote files, oops"

Is there a way I can avoid getting this message... even if no files are deleted. Something like rm -f command.

-Thanks
# 2  
Old 07-21-2008
As far as I know, you can't turn off this warning message that you get from mdelete. Instead, redirect the output to file and filter out them or don't display them.
# 3  
Old 07-21-2008
Try mdelete ./*
# 4  
Old 07-21-2008
mdelete ./* gives the same message. Guess, the warnings are unavoidable as mentioned by matrixmadhan.

-thanks guys
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ftp command

do we have any command run_ftp or this is a function. run_ftp -d $dir $fname $ddir $file b (2 Replies)
Discussion started by: ramkumar15
2 Replies

2. Shell Programming and Scripting

Help with FTP mdelete

Hi, I have some backup scripts running. They allocate the files in separated folders, according to the current day. (01, 02, 03...., 31) After 1 month, the "cycle" starts again, and the files are uploaded to the folder 01, 02... When that happens, I want the previous files to be deleted, so... (4 Replies)
Discussion started by: rafaces
4 Replies

3. UNIX for Dummies Questions & Answers

ftp command

Hi, I am new to shell scripting, I just wan to know that if i want to do ftp that is I have the url of the remote server that is pngpcdb1.walmat.com , Now i want to do ftp and want to transfer some files...how ftp command in unix would help me in that...!!:confused: (3 Replies)
Discussion started by: rahulsxn660
3 Replies

4. Shell Programming and Scripting

mdelete

Hello, I have a big problem with mdelete and I don't know further. In my shell script mdelete filename1 filename2 filename3 etc. does not delete alle files. Here's the log: -rw-r--r-- 1 root root 1 Mar 7 14:40 corrado -rw-r--r-- 1 root root 1 Mar 7 14:40... (1 Reply)
Discussion started by: killmatic
1 Replies

5. Shell Programming and Scripting

mdelete power

hi to all! im using hp-ux 10.2 is it posible for the mdelete command to execute on the root directory if it did not find any file on the specified sub-directory? this is my sample script USER=root PASSWD=root cd /u01/app/oralog/arch ftp -n 192.119.10.3 user $USER $PASSWD prompt... (2 Replies)
Discussion started by: gunsbong
2 Replies

6. Shell Programming and Scripting

FTP command ?

yesterday i was given an FTP command to use on UNIX Solaris and it was very straight forward and that's probably why i don't remember it, i only remember convoluded things apparently! but it was something as simple as this: ftp xyz_abc.com but that's apparently not it, does anyone know... (2 Replies)
Discussion started by: bobk544
2 Replies

7. UNIX for Advanced & Expert Users

ls command in FTP

Hi , I am ftping one file from the remort server to local server. I have to choose the recent file from the remote server . To get the recent file i am using the following command. ftp -nvi $IP_ADDRESS user $USER_NAME $PASSWORD bin lcd $LOCAL_DIR cd $REMOT_DIR filename=ls -t ff*... (1 Reply)
Discussion started by: ammu
1 Replies

8. AIX

ftp command

How can i make ftp form my pc to my server ? (2 Replies)
Discussion started by: magasem
2 Replies

9. Linux

ftp command

Hi there! I've used the ftp command to transfert datas between linux to unix box. The answer of this command, was: ftp -A -v n0dark Connected to n0dark. 220 n0dark FTP server (Version 4.1 Thu Sep 12 23:46:23 CDT 2002) ready. Name (n0dark:root): ftpn0darkusr 331 Password required for... (2 Replies)
Discussion started by: nymus7
2 Replies

10. UNIX for Dummies Questions & Answers

I need help concerning the FTP command

How can I use it to copy and get files from other machines. if anyone knows of this FTP command, please post all that you know about it here so I can learn more. (2 Replies)
Discussion started by: TRUEST
2 Replies
Login or Register to Ask a Question