Cache\
Folder1
File1.txt
File2.txt
File3.txt
Code: Select all
RD "\My Software\FirefoxPortable+TorPortable\FirefoxPortable\Data\profile\Cache\" /s
My code above deletes all the folders and files including the directory itself.
Moderator: DosItHelp
Code: Select all
RD "\My Software\FirefoxPortable+TorPortable\FirefoxPortable\Data\profile\Cache\" /s
Code: Select all
@echo off
setlocal
set "myPath=\My Software\FirefoxPortable+TorPortable\FirefoxPortable\Data\profile\Cache\"
for /d %%d in ("%myPath%*") do rd /s /q "%%~fd"
del /q "%myPath%*
Code: Select all
@echo off
set delContent="o:\d"
del %delContent% /q
for /f "Tokens=*" %%G in ('dir "%delContent%" /ad /s /B') do rd /s /q "%%G"
exit
tinfanide wrote:Could ya explain a bit the use of "%%~fd"?
I can hardly find it online for explanation.