I have a quarterly returning process where around 60.000 pdf's are created. I unzip these to be able to determine the runtime of the creation of the pdf's. In total there are 7 different groups, so I have 7 set names. But the period is different, causing changes in folder name structure. The structure of the zipfiles contains subfolders which are used by other people, i want to move the pdf-files to 1 folder.
So situation: M06-Q2_Juni will be M09-Q3_September
Location: C:\Lolke\2020\M06-Q2_Juni\Run\PBNL\Digital (this contains subfolders)
Destination: C:\Lolke\2020\M06-Q2_Juni\Run\PBNL\allpdfs
I have the below Test script that works when I hardcode source and destination, but this preferably is variable. But I cannot find anywhere on Google how to do this in combination with moving pdf files.
New-Item -Path '\\solon.prd\files\P\Global\Users\C43048\UserData\Desktop\Test_Powershell\allpdfs' -ItemType Directory
Get-Childitem \\solon.prd\files\P\Global\Users\C43048\UserData\Desktop\Test_Powershell\Digital -recurse -filter "*.pdf" | %{
Move-Item -Path $_.FullName -Destination \\solon.prd\files\P\Global\Users\C43048\UserData\Desktop\Test_Powershell\allpdfs}
Aucun commentaire:
Enregistrer un commentaire