I need to copy images generated by software (HWMonitorPro). Folders and sub-folders of images cannot be modified (or I did not find how).
The images are stored in the following path:
C:\Users\hugo\Documents\DossierTest\logs\[JUN 13, 2022 - 11:06]\[LAPTOP-P15V]\[1280x960].
As you can see, a directory is created with each recording, with the date and time. So I decided to use the following technique to be able to take the images of several captures at once:
$C = "C:\Users\hugo\Documents\DossierTest\logs"
copy-item $C'\*\`[LAPTOP-P15V`]\`[1280x960`]\789.txt' -Destination $C\test3
The line works with "[JUN 14, 2022 - 9:22]" instead of "*". This is what I get when I use the line show above:
PS C:\Windows\system32> C:\Users\hugo\Documents\DossierTest\ScriptCC.ps1
Copy-Item : Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [LAPTOP-P15V
At C:\Users\hugo\Documents\DossierTest\ScriptCC.ps1:3 char:1
+ copy-item $C'\*\`[LAPTOP-P15V`]\`[1280x960`]\789.txt' -Destination $C ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Copy-Item], ParameterBindingException
+ FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.CopyItemCommand
If anyone could help me solve my problem that would be great!
PS: I'm French, sorry if it's badly written.