Author |
Message |
Alice
Joined: 29 Jan 2015 Posts: 282
|
Posted: Thu May 23, 2024 2:11 pm Post subject: VV6-6010 MOVE only the folder that starts with today's date |
|
|
hello hello.
So a PowerShell script is running and copying data from SharePoint Online to a local server.
Each day it creates a local folder based on today's date ('YYYY-MM-DD'), so :
Connect-PnPOnline -Url $URL -ClientId "xyz" -ClientSecret "xyz" -CreateDrive -WarningAction Ignore
$Date = (Get-Date).ToString("yyyy-MM-dd")
$LocalPath ="C:\- Working Files\Transfers from SPO\DocsStor\" + $Date
etc etc
what I then need to do is MOVE just that folder and its contents off the local server and onto another network device using VVE/VV.
So a Subfolder include filter of '\Today's date*'', perhaps for VV that would be '\<date>*'......that might work ? But it does not seem to
Any help would be appreciated.
A. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8768
|
Posted: Fri May 24, 2024 3:53 am Post subject: |
|
|
Hi Alice,
what is the date format used?
thanks |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 282
|
Posted: Fri May 24, 2024 4:19 am Post subject: |
|
|
YYYY-MM-DD
|
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 282
|
Posted: Fri May 24, 2024 4:20 am Post subject: |
|
|
Format for today's date would be :
2024-05-24 |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8768
|
Posted: Fri May 24, 2024 5:59 am Post subject: |
|
|
Ah, I think you can match that date format with:
<year>-<month>-<day>
while <date> is equivalent to <year><month><day> (20240524) _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 282
|
Posted: Fri May 24, 2024 7:12 am Post subject: |
|
|
worked
thank you. |
|
Back to top |
|
|
|