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 Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,462 questions
0 comments No comments
{count} votes

1 answer

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