English 中文(简体)
Robocopy filter not working?
原标题:

Hi I m trying to use robocopy to copy a single file from my computer to another computer over the network. The file I m going to copy is named setup.exe and the directory it rests in also has a directory called "setup". I only want to copy over the executable, so I tried applying a filter to the robocopy command at the end listing the filename. However, despite the filter, it ends up copying both the executable AND the directory. Apprently robocopy ignores the file extension???

Here is the format of my robocopy command:

robocopy c:usersendesktop /E /Z \BensRemotec$ emp setup.exe

so the filter at the end should be preventing the setup directory from also being copied over but it isn t. What am I doing wrong? Is it the /E argument???

最佳回答

The /E argument is what causes the problem.

问题回答

Drop the /E.

/E will copy over subdirectories, including empty ones. The filter you re applying, setup.exe , only refers to files, not folders.





相关问题
Code snippet paths in GCC

Background: Keil C51 on a PC, currently moving to GCC (CrossPack-AVR) on an iMac. Since I write firmware for micro s I have a lot of driver source files etc. that I need to include with my programs,...

C#/.NET app doesn t recognize Environment Var Change (PATH)

In my C# app, I am programmatically installing an Oracle client if one is not present, which requires adding a dir to the PATH system environment variable. This all works fine, but it doesn t take ...

PHP absolute path to file URI

In order to refer to a local DTD when using PHP SimpleXML, I need to convert the absolute path into a file type URI. For example, convert /home/sitename/www/xml/example.dtd to file:///home/sitename/...

Check if files with absolute and relative path exists

Is there a way to check whether files (with either an absolute or relative path) exists? Im using PHP. I found a couple of method but either they only accept absolute or relative but not both. Thanks.

How to get file path of the file with the running-vba code

I want to get the folder path from the file who is running the vba-code. For example: the vba-code is in the file C:myfolderfile.accdb and I want the vba-code to return C:myfolder Is that ...

热门标签