Works only on Windows
- create new file call it frm.bat (command name can be anything)
- open with your favourite code editor and paste the following code
- move it into Program Files (x86) to be available for Powershell
@echo off
if "%~1"=="" (
echo No parameters have been provided.
echo ex: frm {file/folder}
) else (
if exist %1\* (
echo Removing %1 with recursion please wait...
cmd "/C rm -r %1 -f"
echo %1 removed.
) else (
echo {%1} doesn't exist
)
)
You are done, open Powershell and type
/frm {folder name}
all this simple code does is running native powershell command
rm -r {folder_name} -Force
Top comments (0)