How To Delete Files And Folders With A Batch File
HTML-код
- Опубликовано: 10 сен 2024
- list of my created websites: jebbidanyt.000...
my main website: jebbidan.edito...
the code:
@echo off
cd /d "enter your directory here"
cls
title delete files and fodler
echo deleting...
echo.
echo please wait!
for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
del . /q
rem the "del" command is useful for deleting files
rem the "*.*" argument on the del command is useful for deleting every types of file
rem this command: for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
rem is useful for deleting every files in a directory
Great video. Helped me a lot. My nephew did say you sounded like Arnim Zola from the MCU lol
Hahahaha 😂
When I insert my delete.bat "G:\delete.bat" into Task Scheduler, "Start A Program" ... when runs, it tries to delete ALL files on my computer???? I have the bat file in my G:\ drive where the directories are I want to delete. Running the bat file from a command line works great! ???? help
Well I don't know about that one. Sorry
Hi, how to delete file from all user profiles using batch files? Thank you
I will look into that. thanks for the suggestion
how to make the batch connect to server and delete some files on it. please your advice.
You cannot do that stuff with a batch file. Only programming language that has the ability to connect to a remote server can
Hi. What if, the date of folder is refering to the name of folder instead of the modified date? Can we delete it based on the folder name?
well that is pretty easy, just add this code:
rd /q /s "insert full directory to the folder here"
Can you delete files if the files are in the same folder where the bat file is?
yes, you got to specify what's the file type you are going to delete.
for example, I want to create a batch file that deletes all text files in the same folder so I'm going to use the .txt file extension:
del /q *.txt
How to overwrite the drive and delete multiple times to erase data permanently?
you mean you want to format the drive?
Can batch file uninstall through cmd? if yes can u say
Well technically yes, you can uninstall using cmd. It's just that it is tedious to copy and paste every single filenames to a batch file
thank you i deltete my hole PC
Can you assist me with a batch script to uninstall office 2019
You want me to create a batch script that uninstall office 2019 for you? Well I can't do that right now but expect a new tutorial video from me on how to do just that
@@Jebbidan A tutorail will help, when will the tutorial be available?
@@mosesmasaku8779 by tomorrow so expect a video from me (note: you should subscribe to my channel first to get notified)
@@Jebbidan Yes I did thanks
uhh... i have bad news for you. right now, i can't upload the video i promised to you but by tomorow i will so be sure to wait for it
IT DELETED THE HALF OF MY DESKTOP
then don't run it on your main windows OS!!! use a virtual machine instead
@@Jebbidan But i dont have administrator :(
@@Jebbidan What now
@@flauschfell932 I don't know, get an admin pass?
me too
What is a batch file
a batch file is a script file that contains list of commands for the windows OS to execute
@@Jebbidan Thanks
@@jevinpioxavierj6109 your welcome
.bat
@@Jebbidan i need to delete a file every time it is created! May you help me
haha now win 32 on school pc go brrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr (JK GUYS IS A JK DONT CANCEL ME ON TWITTER)