小编Lay*_*ton的帖子

如何回答批处理文件中的提示

根据我添加的建议/ad仅返回目录,但继续收到提示。提示表明它想知道是创建文件还是目录。

如何在批处理脚本中自动回答?

这是提示:

Does \\server\tf\POL-5TVK5J1\Administrator\Desktop specify a file name or directory name on the target (F = file, D = directory)?
Run Code Online (Sandbox Code Playgroud)

这是我的脚本:

@echo off
md "\\my server\tf\%computername%"
cd documents and settings
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\Desktop" "\\my server\tf\%computername%\%%u\Desktop" /D /R
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\Favorites" "\\my server\tf\%computername%\%%u\Favorites" /D /R
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and …
Run Code Online (Sandbox Code Playgroud)

prompt batch-file

3
推荐指数
1
解决办法
1697
查看次数

标签 统计

batch-file ×1

prompt ×1