Uthade
Uthade

Reputation: 1

How to delete all files and folders on FTP?

Is there a way to delete all files and folders on ftp by one click with using php? I searched by google and stackoverflow but there are no results for the all files, just for single file or folder. So can anyone help me about this?

Upvotes: 0

Views: 2638

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202272

There's no way in FTP to delete a directory recursively using a single command. If that's what you mean by "one click".

You have to recursively list folder and delete files and subfolders one-by-one.

For that see:
Delete folder and all files on FTP connection

Upvotes: 1

Related Questions