Solved

FTP ERROR 500 , DIRECTORY CANNOT BE DELETED

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Parse a Text File Based on Record Number in File 8 40
Group Policy Object - Mapping DrivesI'v 5 51
Batch to Restart Remote Computers 4 80
network copying issue 4 60
Samba is the de-facto standard program (or, more correctly: suite of programs) that UNIX and Linux systems use to share files with Microsoft Windows (and more recently, Mac OS-X) systems. Currently, there are 2 common versions of Samba available,…
Goal:  To set up a secure SSH server for your home computer to make it accessible anywhere AND to use it as a port forwarding proxy. Steps 1.  WinSSHD version 5 is free for personal use.  So download and install it.  You can download it from the…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

896 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

14 Experts available now in Live!

Get 1:1 Help Now