Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Robo Copy - XF error

713 views
Skip to first unread message

daniel...@gmail.com

unread,
Oct 14, 2015, 12:22:44 PM10/14/15
to
I have this Robo Copy command.

ROBOCOPY \\mchdis\dis\Cerner\prod \\mchdis\dis\Cerner\mytest /COPY:DAT /XF \\mchdis\dis\prod\*.PDF \\mchdis\dis\prod\*.TIF /S /E /R:0 /W:0 /ZB /MT:8



but, I am getting this error:

ERROR : Invalid Parameter #5 : "\\mchdis\dis\prod\*.PDF"

Simple Usage :: ROBOCOPY source destination /MIR

source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.

For more usage information run ROBOCOPY /?


**** /MIR can DELETE files as well as copy them !


I wanted to exclude the .PDF and .TIF.

Without this /XF, the Robocopy works fine

/XF \\mchdis\dis\prod\*.PDF \\mchdis\dis\prod\*.TIF


Please let me know how to add /XF to my Robo copy syntax.

Zaidy036

unread,
Oct 14, 2015, 2:49:17 PM10/14/15
to
try /XF *.PDF *.TIF

daniel...@gmail.com

unread,
Oct 14, 2015, 3:23:37 PM10/14/15
to
Thank you!!
That work for the PDF and TIF under \\mchdis\dis\prod\.
I have more PDF and TIF files under the Sub-directory (\\mchdis\dis\prod\rrd\)

How do I exclude the PDF and TIF files under the Sub-directory (\\mchdis\dis\prod\rrd\)?

Please advise.

Zaidy036

unread,
Oct 14, 2015, 4:14:53 PM10/14/15
to
/XF *.PDF *.TIF /prod/*.pdf /prod/*.tif

manuals are available - Google: +RoboCopy +manual

daniel...@gmail.com

unread,
Oct 14, 2015, 5:35:45 PM10/14/15
to
I looked at the manuals and tried as well, but am getting this error for the Subdir ( / rrd). / or \ for the dir makes no difference.
Can you please advise?


ERROR : Invalid Parameter #5 : "\rrd\*.pdf"

Simple Usage :: ROBOCOPY source destination /MIR

source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.

For more usage information run ROBOCOPY /?


**** /MIR can DELETE files as well as copy them !

ERROR : Invalid Parameter #5 : "\\mchdis\dis\prod\rrd\*.pdf"

Zaidy036

unread,
Oct 14, 2015, 10:22:39 PM10/14/15
to
On 10/14/2015 5:35 PM, daniel...@gmail.com wrote:
> ROBOCOPY \\mchdis\dis\Cerner\prod \\mchdis\dis\Cerner\mytest /COPY:DAT /XF \\mchdis\dis\prod\*.PDF \\mchdis\dis\prod\*.TIF /S /E /R:0 /W:0 /ZB /MT:8

Looking again at your original command I think you left off \Cerner and
the following would be correct:
/XF \\mchdis\dis\Cerner\prod\*.PDF
\\mchdis\dis\Cerner\prod\*.TIF

/S and /E should NOT both be used in the same command:
/S Copies subdirectories (excluding empty ones).
/E Copies all subdirectories (including empty ones).

I find the using set makes it easier to follow in a batch and less prone
to error::
SET SRC= \\mchdis\dis\Cerner\prod
SET DST=\\mchdis\dis\Cerner\mytest
START "" /WAIT RoboCopy %SRC% %DST% ..........

Also look at the header of the output report and you will see what
RoboCopy thinks you asked for. Add a /LOG even if only temporarily in an
easy place to find (desktop).

For clarity maybe place the /XF at the end or the command so all
following are excluded files.



0 new messages