I'm facing with this issue that i couldn't figure it out until now ?
I tried with command Del but no chance.
Code: Select all
@echo off
set "targetdir=C:\FolderDir"
for /f "delims=" %%a in ('dir/s/b/a-d "%targetdir%\*.*"') do ( if %%~Za equ 0 echo %%~na>>results.txt && del "%%~a" )
Code: Select all
RD /S /Q [ParentFolder with file Call Inside]
Code: Select all
Get-ChildItem -Path "C:\MyFolderDir" -Recurse -Force | Where-Object { $_.PSIsContainer -eq $false -and $_.Length -eq 0 } | remove-item
Solution Provided by Compo on stackoverflow thanks to him :
Trailing spaces are not valid in Windows,I tried to delete it like this:
Code: Select all
Del /A /F "\\?\C:\Users\Hackoo\Desktop\Scripting\Call "