3
I need that when executing one script cmd. it erases all files with the following extensions: .txt
and .mp4
if any. These files are located in the following folder C:\comando\batch\diretorio\teste
and the script cmd. is located in C:\comando\batch
.
How could I do that, knowing that after these commands, others will be executed, but not to the folder test, and yes in the folder batch.
That is, it is possible to do this without leaving the folder batch?
Commands must be compatible with Windows 2003/XP.
Just a doubt, the way it is there, no confirmation is needed when executing the
del
right? Or you have to put the/q
as mentioned in the comments? If yes, how would it be? ps: I liked the command%~dp0
very interesting :)– Florida
@Florida As far as I know not, but if you want you can use the
/p
to ask before. About the%~dp0
, https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true– stderr