Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Delete Remove File Folder Batch

@echo off
Mode 90,5 & color 0B 
Title Delete and Remove a File or a Folder by Drag and Drop with Batch File
if "?\%~1"=="?" goto error
echo(
RD /S "?\%~1" 2>nul
DEL /P "?\%~1" 2>nul
Timeout /T 2 /NoBreak>nul & exit /b
::------------------------------------------------------------
:Error
echo( & echo(
echo   You should drag and drop a folder or file over "%~nx0"
Timeout /T 10 /nobreak>nul & exit /b
::-------------------------------------------------------------
Source by forums.commentcamarche.net #
 
PREVIOUS NEXT
Tagged: #Delete #Remove #File #Folder #Batch
ADD COMMENT
Topic
Name
7+5 =