Delete files in batch script

tistou77

Member
Hello

I would like to make myself a batch to delete several files in a folder that comes back with each update (Edge Canary)

The problem is that one of the directories changes its name with each update

Is it possible ?
Failed to find

Thanks
 
For example, AppData\Local\Microsoft\Edge SxS\Application\113.0.1729.0\Locales\am.pak

But the 113.0.1729.0 directory changes with every update

Thanks
 
Code:
@echo off
for /d %%g in ("%LOCALAPPDATA%\Microsoft\Edge SxS\Application"\*) do (
   if exist "%%g\Locales\am.pak" (del "%%g\Locales\am.pak")
)
 
Thanks for your help ;)

I have several such files in the folder (xxx.pak)
Tested like that and it's good

Code:
@echo off
for /d %%g in ("%LOCALAPPDATA%\Microsoft\Edge SxS\Application"\*) do (
   if exist "%%g\Locales\af.pak" (del "%%g\Locales\af.pak")
   if exist "%%g\Locales\am.pak" (del "%%g\Locales\am.pak")
   etc....
)

Thanks so much
 
Last edited:
Back
Top