Solved

FTP ERROR 500 , DIRECTORY CANNOT BE DELETED

Posted on 2008-10-06
4
740 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now