Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

FTP ERROR 500 , DIRECTORY CANNOT BE DELETED

Posted on 2008-10-06
4
Medium Priority
?
766 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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 …

604 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