Coping files that have been changed to a new location.

I’m trying to write a PowerShell script that will copy files that have been changed\updated to a new location.  I’ve tried the below and I get error saying that no files are found.  What I’m I doing wrong?

 

Get-PWDocumentsBySearch -FolderPath 'Common Files\Graphic Standards Workspace\00_ORD Test Area\Configuration Folder\TEST Graphic Standards (ORD)' -FileName *.* |

Copy-PWDocumentsToFolder -TargetFolderPath 'Central Office\Highway Design\User Folders\Smith, Alex\District 05\' -Verbose

thanks

alex 

Parents
  • To get all files use a % for the -FileName instead *.*

    Get-PWDocumentsBySearch -FolderPath 'Common Files\Graphic Standards Workspace\00_ORD Test Area\Configuration Folder\TEST Graphic Standards (ORD)' -FileName '%'

    and although it worked in my testing without, might put quotes around the % as it's also an operator, might break in the future without.

     

Reply
  • To get all files use a % for the -FileName instead *.*

    Get-PWDocumentsBySearch -FolderPath 'Common Files\Graphic Standards Workspace\00_ORD Test Area\Configuration Folder\TEST Graphic Standards (ORD)' -FileName '%'

    and although it worked in my testing without, might put quotes around the % as it's also an operator, might break in the future without.

     

Children
No Data