Transfer the last file modified to another folder with powershell script

Rafael Santos 1 Reputation point
2022-07-06T14:28:26.767+00:00

Hi all,

Is possible to transfer the last file added to a SharePoint site for a local folder using a PowerShell script? I use the script below to transfer files but always transfer all files.

Script:
218180-script.jpg

Result when I execute the script:
218291-result.jpg

Any idea about how can I transfer just the last file added?

Best regards.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 48,026 Reputation points
    2022-07-06T18:48:20.497+00:00
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.