English 中文(简体)
• 如何将档案复制成非现有目录?
原标题:How to use xcopy to copy a file into a non existing directory?

作为自动笔记的一部分,我试图在窗户的指挥下做这样的事情:

xcopy /I /Y resourcesxyzpqrs.txt %TEMP%
esourcesxyzpqrs.txt.bak

单位:%

这是互动产出,我获得:

Does C:UsersusernameAppDataLocalTemp
esourcesxyzpqrs.txt.bak specify a file name
or directory name on the target
(F = file, D = directory)?

整件事是,我想在没有互动的情况下创建目录和复制文件。

如果我使用ir子,我将不得不在使用 m子之前提取 director。 我很想知道,它能否同时利用微粒实现乳房透镜。

xcopy reference

得到帮助。

问题回答

为此:

echo d| xcopy /f C:abcfile1 C:abc ewfolderfile2

如果目的地路线以斜坡结束,将自动作为名录处理:

xcopy /f C:abcfile1 C:abc
ewfolderfile2

Does C:abc
ewfolderfile2 specify a file name
or directory name on the target
(F = file, D = directory)? f

......

xcopy /f C:abcfile1 C:abc
ewfolder0
ewfolder1
ewfolder2

这样做是正确的。





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签