xRobocopy icon indicating copy to clipboard operation
xRobocopy copied to clipboard

Allow specifying multiple $Files using string array

Open am11 opened this issue 7 years ago • 7 comments

This enables array input for Files parameter:

xRobocopy CopyByUsingFilesFilter
{
  Source = 'C:\temp\source'
  Destination = 'C:\temp\destination'
  Files = @('test1.txt', 'test2.txt')
}

while keeping the (currently supported) single input Files = 'test.txt' and glob pattern Files = '*.sql' intact.


This change is Reviewable

am11 avatar Oct 15 '18 20:10 am11

CI is failing due to a certificate error:

New-SelfSignedCertificateEx : Exception setting "ProviderName": "Unable to cast COM object of type 'CERTENROLLLib.CX509PrivateKeyClass' to interface type 'CERTENROLLLib.IX509PrivateKey2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{728AB362-217D-11DA-B2A4-000E7BBB2B09}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."

am11 avatar Oct 15 '18 22:10 am11

Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again.

stale[bot] avatar Nov 01 '18 12:11 stale[bot]

Hi @am11, the error seems to be coming from the DscResources.tests Just to validate it's not been fixed since you last tried, I'd appreciate if you could try to push again to trigger an AppVeyor build. Otherwise I'll try to get back to this request in a few weeks to investigate and get it merged. The change itself looks ok, although there are no tests alongside so I'll need to spend some time.

Thanks

gaelcolas avatar Mar 15 '19 05:03 gaelcolas

Codecov Report

Merging #32 into dev will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev      #32   +/-   ##
=======================================
  Coverage   22.95%   22.95%           
=======================================
  Files           1        1           
  Lines          61       61           
=======================================
  Hits           14       14           
  Misses         47       47
Impacted Files Coverage Δ
DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.psm1 22.95% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fd3aa7f...57bf69a. Read the comment docs.

codecov-io avatar Mar 15 '19 05:03 codecov-io

Retriggering the build did the trick, yay! 🚀

am11 avatar Mar 15 '19 05:03 am11

@gaelcolas, just a note. Not all files in the repo follow the eol rule written in .gitattributes, so after the fresh clone, we get the modified files even when our global autocrlf is false. I didn't wanted to push any unrelated change in this PR, but if you think it's fine, I will do that. Otherwise, that can be fixed separately.

am11 avatar Mar 15 '19 05:03 am11

Thanks for the heads up. I'll probably need to first fix that in another PR and then ask you to rebase. But I'll have to have a proper look, in a few days.

gaelcolas avatar Mar 15 '19 14:03 gaelcolas