Forum Discussion
Neil_brown
2 years agoNew Member
Scraping data from PDF and save it
Hi All, Very new to power Query and im hoping there is a solution to help me. I have setup a quyery to import data from various PDF reports in various folders. A new PDF is regularly added and ...
- 2 years ago
Hi Neil_brown, give this a try, and if you encounter any issues, let me know.
Open PowerShell and run the command, making sure to change the source and destination to your own paths.
$sourceFolder = "C:\PDFs" $archiveFolder = "C:\Archive" $files = Get-ChildItem -Path $sourceFolder -Filter *.pdf foreach ($file in $files) { $destination = Join-Path -Path $archiveFolder -ChildPath $file.Name Move-Item -Path $file.FullName -Destination $destination }Did I answer your question? If so, please mark my post as the solution!
Your Kudos are much appreciated! Proud to be a Resolver IV !
ahadkarimi
2 years agoSolution Specialist
Hi Neil_brown, give this a try, and if you encounter any issues, let me know.
Open PowerShell and run the command, making sure to change the source and destination to your own paths.
$sourceFolder = "C:\PDFs"
$archiveFolder = "C:\Archive"
$files = Get-ChildItem -Path $sourceFolder -Filter *.pdf
foreach ($file in $files) {
$destination = Join-Path -Path $archiveFolder -ChildPath $file.Name
Move-Item -Path $file.FullName -Destination $destination
}
Did I answer your question? If so, please mark my post as the solution!
Your Kudos are much appreciated! Proud to be a Resolver IV !