I need a script that checks the name of a CDG file and if is not present in the same folder another file with the *same* name in .mp3, then deletes the cdg file.

I thought to implement it with this simple code:

```
@echo off
for /R %1 %%f in (*.cdg) do (
   if exist %%~nf.mp3 (
      del %%f
     )
)

```

But it return me with a *syntax error* in IF construct.

I tried to google it but it seems no-one had same problem (or i'm really bad in using google)

Can please someone tell me where i'm wrong?