-1

I have a folder named Account

I want to xcopy all its subfolders, but it two phases (i.e. two xcopy commands):

I want to splint this cmd:

xcopy /I /E /Y %env.working_directory%\Deployment\Account\Release*.* \file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts_3.10_Merged\%system.build.number%

Account\folder1 in first xcopy

Account\ --> all other in second xcopy

How can I write the second xcopy? (regex for excluding "folder1")

Elad Benda
  • 35,076
  • 87
  • 265
  • 471

1 Answers1

1

(They are simple wildcards rather than regular expressions)

Robocopy ships with recent versions of windows & can do everything that xcopy can, it supports /xd to exclude directories.

Alex K.
  • 171,639
  • 30
  • 264
  • 288
  • xcopy /I /E /Y %env.working_directory%\Deployment\Account\Release\*.* \\file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts_3.10_Merged\%system.build.number% /xd %env.working_directory%\Deployment\Account\Release\Toolbar\ ____________ this syntax is ok ? – Elad Benda Jan 18 '12 at 12:05
  • /XD is for robocopy not xcopy so you want `robocopy "c:\sourcepath" "c:\destination" *.* /E /XD "dirnametoskip1" ` – Alex K. Jan 18 '12 at 12:14