?
Solved

FTP ERROR 500 , DIRECTORY CANNOT BE DELETED

Posted on 2008-10-06
4
Medium Priority
?
762 Views
Last Modified: 2013-12-02
Hello Experts,I need a quick help with ftp rmdir command.
I am doing ftp through file ftp -s:ftp.file>>ftp.log
inside ftp.file, I have commands to transfer files , create directories etc.
Now , I want to include one more command for remove directory a directory - tranlog which has multiple sub-directories , files inside subdirectories, the  number of subdirectories may vary each time hence I cannot hard code what directores to delete in my script).
Note: I have all the necessary permissions on this directory.
I have tried:
rmdir tranlog
Error:550 tranlog: The directory is not empty
rmdir /SQ tranlog
rmdir tranlog /SQ
/SQ: The system cannot find the file specified
I am not sure how to pass arguments to rmdir to make it work like a deltree command in ms dos.
Please help.

Thanks
0
Comment
Question by:sravy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Expert Comment

by:kukno
ID: 22652780
Hi,

you say:

>inside ftp.file, I have commands to transfer files , create directories etc.

well, if you create the directories in the batch file, you can delete them in reverse order, right?

Sampe:

mkdir /test
mkdir /test/test
mkdir /test/test/test
put xyz
delete xyz
rmdir /test/test/test
rmdir /test/test
rmdir /test

Regards
Kurt


0
 
LVL 10

Expert Comment

by:kukno
ID: 22652809
0
 
LVL 1

Accepted Solution

by:
sravy earned 0 total points
ID: 22653263
Hi Curt,
I am trying to delete the tranlog from outside..
T think the exception is - to delete a non-empty directory.
this can be solved by passing arguments /S/Q to rmdir  like we do in normal commandline..but am not sure how.
0
 
LVL 10

Expert Comment

by:kukno
ID: 22653313
wait a moment. Are you talking about the DOS command rmdir or the ftp command rmdir? If it's the ftp command, then there is no /Q /S options! See the link I posted for a possible solution.

Regards
Kurt
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface There are many applications where some computing systems need have their system clocks running synchronized within a small margin and eventually need to be in sync with the global time. There are different solutions for this, i.e. the W3…
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question