Your FOR statement contradicts what you wrote in your thread. It also stretches DOS syntax to new levels. Where did the %%c variable come from?
If you look at what you wrote, logically it becomes a simple chore. First get a list of the Test directory, check to see if exists in TRANSFER and if it does then go back and delete it from TEST.
for %%f in ('dir /b c:\pstemp\test\*.sqc') do (
if exist "c:\pstemp\transfer\%%f" del c:\pstemp\test\%%f)
)
I only showed you how to process the sqc files. If you apply the same logic to the sqr files, you're all set.
Hope this helps.
You should have been here a few weeks back. We had a special two for one deal on FOR statements.