批处理文件要求文件或文件夹 [英] BATCH file asks for file or folder
问题描述
我从脚本简单的副本,谁是从我的办公桌
缺少一个文件20公里我们的球员之一测试脚本时出提示我,如果我的文件 shapes.atc
是一个文件或文件夹
我可以告诉你,它的一个文件,但我怎么能自动复制它在我的家伙需要能够只单击批次完成
XCOPY / S / Y j:\\我的名字\\文件过境\\ JOHN20101126 \\缺少文件\\ Shapes.atc C:\\文件和设置\\ 他的名字\\应用程序数据\\欧特克\\AutoCAD 2010的\\R18.0\\ ENU \\支持\\ Shapes.atc
一个看似无证窍门是把一个 *
的目标位置的结束 - 那么 XCOPY
将复制为一个文件,像这样
XCOPY C:\\源\\ file.txt的C:\\目标\\ newfile.txt *
的回声F | XCOPY ...
招不能在Windows,其中,提示不同的本地化版本。
I have a simple copy from to script for one of our guys who's missing a file 20km from my desk
when testing the script out I am prompted if my file shapes.atc
is a file or a folder
I can tell you that its a file but how can I autocopy it over my guy needs to be able to just click the batch finished
xcopy /s/y J:\"My Name"\"FILES IN TRANSIT"\JOHN20101126\"Missing file"\Shapes.atc C:\"Documents and Settings"\"His name"\"Application Data"\Autodesk\"AutoCAD 2010"\"R18.0"\enu\Support\Shapes.atc
A seemingly undocumented trick is to put a *
at the end of the destination - then xcopy
will copy as a file, like so
xcopy c:\source\file.txt c:\destination\newfile.txt*
The echo f | xcopy ...
trick does not work on localized versions of Windows, where the prompt is different.
这篇关于批处理文件要求文件或文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!