I'm made this simple batch script that reads devices line by line from Device_List file and for each device delete some folders using Windows samba shared folder.
@ECHO OFF
for /f "delims=" %%a in (C:\Device_List.txt) do (
set computer=%%a
SET path=\\%computer%\c$\Dir_to_delete
DEL %path%\* /s /f /q
)
If I run program I take \Overlook was unexpected at this time error. Issue seems related to for cycle, since if I remove it, other commands works as expected. Anyone can help me?