Could you please specify how you will differentiate "somefile.vi", does it not contain any numbers, or do you know its individual name?
If it is the latter, I believe this should work if run from the C:\foo folder
for /r %%a in (*) do (if %%~na NEQ somefile echo %%~pa%%~na%%~xa >> output.txt)
Note instead of "@@\bar..." you will get "\foo\bar..." If there are multiple files you want to exclude simple nest more if commands:
for /r %%a in (*) do (if %%~na NEQ somefile1 if %%~na NEQ somefile2 if %%~na NEQ somefile3 echo %%~pa%%~na%%~xa >> output.txt)
And so on.... I've tried this on my computer and it worked fine.
Yours, Mona