Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 i would like power query to add this data, once a day or so. The issue is that the query takes an absolute age to run for the shear volume to pdf docs and the amount of query steps to remove the data and transform it.
Any ideas would be appreciated. An oportunity to learn!
Solved! Go to Solution.
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 !
Hi @ahadkarimi,
Thanks for the reply and appologies for not getting back to you earlier. I guess this solution takes the files from the specific folder and moves them to an archive location. Is there a way to automate this as part of the Power Bi scraping of data.
Regards
Hi @Neil_brown
Did the solution @ahadkarimi offered help you solve the problem, if it helps, please consider to accept it as a solution so that more user can refet to, or you can provide more information so that can help you solve the problem.
Best Regards!
Yolo Zhu
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 !
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |