Based on your description, seems you want to empty the destination folder before a new deployment.
If it is, then when using the Azure App Service Deploy task, and you are using the Publish using Web Deploy option, there is an additional option to Remove Additional Files at Destination.
If you check this option, the deployment process will remove any files at the destination where there is no corresponding file in the package that is being deployed.
In other words, it'll remove any left over files from a previous deployment that are no longer required.
Refer to Removing Deleted Files during Visual Studio Team Services Azure App Service Deploy Task for details.
Besides, you can also try the extenion Azure WebApp Virtual File System Tasks, it can delete files from Azure Web Apps through KUDU Virtual File System Rest API (Put & Get coming soon)
If that still not work, then you can write a script to delete the specific folder. But you need to make sure that the service account has the correct permission to access and delete the folder on Azure.
Alternately you can Remove-Item with Specific Credentica, below script for example:
Param(
[string]$computerName = "computername",
[string]$path ="E:\test\specific-folder"
)
$Username = "domain\user"
$Password = ConvertTo-SecureString "PasswordHere" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($Username,$password)
Invoke-Command -computername $computerName {Remove-Item -path $args[0] -Recurse} -cred $cred -ArgumentList $path