Delete directory and files with subdirectorys with ftp command line
Moderator: DosItHelp
Delete directory and files with subdirectorys with ftp command line
Hi
How can Delete directory and files with subdirectorys with ftp command line?
For example i have a folder with name folderB1
In that folder is many files and subfolders with files
My problem is that i dontknow subfolders name for delete thats one by one
Now how can Delete directory and files with subdirectorys?
How can Delete directory and files with subdirectorys with ftp command line?
For example i have a folder with name folderB1
In that folder is many files and subfolders with files
My problem is that i dontknow subfolders name for delete thats one by one
Now how can Delete directory and files with subdirectorys?
Re: Delete directory and files with subdirectorys with ftp command line
my problem this...
when i want remove directory,then show me message directory not empty...
i how can delete AAA folder with sub directory and files?
i see links but i have problem again...
is possible give me example?
thanks
Re: Delete directory and files with subdirectorys with ftp command line
You will likely need to run delete or mdelete first to remove files before removing the directory with rmdir.
It doesn't look however like there is a mrmdir command so you may only be able to remove a single one at a time.
It doesn't look however like there is a mrmdir command so you may only be able to remove a single one at a time.
Re: Delete directory and files with subdirectorys with ftp command line
Is true
But when i dont know sub folders name,how can goto folder for remove files?
But when i dont know sub folders name,how can goto folder for remove files?
Re: Delete directory and files with subdirectorys with ftp command line
Probably something like that:
Untested though.
Steffen
Code: Select all
cd AAA
prompt
mdel *
cd ..
rmdir AAA
Untested though.
Steffen
Re: Delete directory and files with subdirectorys with ftp command line
Yes i test this and work for delete files in folder
But how can delete folders that do not know their name؟
For full example see this:
In folder AAA is several folders and files
If i dont know folders name cant goto inside folder to be empty that and after remove empty folder
My problem is find folders name for delete folder files and after delete folder
But how can delete folders that do not know their name؟
For full example see this:
In folder AAA is several folders and files
If i dont know folders name cant goto inside folder to be empty that and after remove empty folder
My problem is find folders name for delete folder files and after delete folder
Re: Delete directory and files with subdirectorys with ftp command line
I'm not aware of any possibility to do that using the Windows FTP command. Most likely you have to find a 3rd party utility for this task.
Steffen
Steffen
Re: Delete directory and files with subdirectorys with ftp command line
Thanks for the help
Is possible do this work with any software with call with cmd to send parameters?
Is possible do this work with any software with call with cmd to send parameters?
Re: Delete directory and files with subdirectorys with ftp command line
Google told me something about NcFTP which seems to support option -r for rmdir.
Steffen
Steffen
Re: Delete directory and files with subdirectorys with ftp command line
NcFTP good work rmdir -r but i have another problem...
in ftp command i can use like this:
is possible i run commands in NCFTP like this? write code in a text file and call them with NCFTP?
in ftp command i can use like this:
Code: Select all
@echo off
echo open FTPADDRESS> DeleteDirectory2.txt
echo FTPUSERNAME>> DeleteDirectory2.txt
echo FTPPASSWORD>> DeleteDirectory2.txt
echo CD AAA>>DeleteDirectory2.txt
echo prompt>>DeleteDirectory2.txt
echo mdelete *>>DeleteDirectory2.txt
echo cd ..>>DeleteDirectory2.txt
echo RMDIR AAA>>DeleteDirectory2.txt
echo disconnect>>DeleteDirectory2.txt
echo quit>>DeleteDirectory2.txt
ftp -s:DeleteDirectory2.txt
del DeleteDirectory2.txt
is possible i run commands in NCFTP like this? write code in a text file and call them with NCFTP?
Re: Delete directory and files with subdirectorys with ftp command line
not possible remove a directory without name in ftp?
in ncftp i need like this:
but not worked!
in ncftp i need like this:
Code: Select all
@echo off
echo open -u FtpAddress> ftpcmd.txt
echo FtpUsername>> ftpcmd.txt
echo FtpPassword>> ftpcmd.txt
echo mkdir AAA>>ftpcmd.txt
echo cd AAA>>ftpcmd.txt
echo mkdir 1A>>ftpcmd.txt
echo mkdir 2B>>ftpcmd.txt
echo mkdir 3C>>ftpcmd.txt
echo cd ..>>ftpcmd.txt
echo cd AAA>>ftpcmd.txt
echo rm -r *>> ftpcmd.txt
ncftp -f ftpcmd.txt
del ftpcmd.txt
but not worked!
Re: Delete directory and files with subdirectorys with ftp command line
Sorry, but neither do I know NcFTP (I was just googling for you) nor do I own any FTP server share where I could test it. Just follow their documentation links
http://www.ncftp.com/ncftp/
Steffen
http://www.ncftp.com/ncftp/
Steffen
Re: Delete directory and files with subdirectorys with ftp command line
aGerman wrote:Sorry, but neither do I know NcFTP (I was just googling for you) nor do I own any FTP server share where I could test it. Just follow their documentation links
http://www.ncftp.com/ncftp/
Steffen
I tried by: http://www.ncftp.com/ncftp/
but I did not succeed
i send to you in PM a FtpAddress and Username and Password for testing codes
If possible test ncftp or ftp for delete folder with sub folders
For example i have a directory with name 'Root' and in that is many folders without file
I want to delete directory 'Root' with all sub directorys (if i don't know sub folders names)