@ECHO OFF
:ProfilDeleter
SET /P PC=Enter Remote Ip/HostName (for Exit press M):
if [%PC%]==[] cls && @echo you should fill && goto ProfilDeleter
if %PC%==m goto :Menu
if %PC%==M goto :Menu
SET /p NotToBeDeleted=Your UserName:
cls
::HERE NOT WORKING
SET Profiles=\\%PC%\C$\Users
PushD "%Profiles%"
if /I Not "%CD%"=="%Profiles%" (ECHO. Unable to find %Profiles% exiting)&Pause&goto Menu
FOR /F "Delims=" %%I in ('Dir /AD /B ^|FindStr /I /V /C:"%NotToBeDeleted%" /C:"ADMINI~1" /C:"Public" /C:"Default" /C:"Administrator"') DO RD /Q /S "%%I"
PopD
pause
:Menu
Exit
我创建了批处理以删除远程用户配置文件文件夹,但我无法在远程 PC 上运行?脚本中的问题出在哪里?