Forum Discussion
How to import files from different paths
file list is dynamical and i dont know how many files is in the table and i dont know files names...
so i cant write separate query for each file...
I don't understand your request:
If you import from a folder, all files in that folder and all files in all its subfolders will be imported. UNLESS: You filter some files in them. So you just have to grab the uppermost path to grab all files in it.
If you have any other kind of logic to identify what shall be imported, please try to explain better.
- skurek7 years agoNew Member
I have files in many shared locations:
1. server in Poland, many folders and files
2. server in US, many folders and files...
3. ...
I can import all folders and files from these shared locations. BUT this cost PQ a lot of time.
Files and folders in these locations is too many.
before these files are displayed in PQ and I will filter them in pq - it takes a long, long time...
so i need to import only concrete files from shared locations...
- ImkeF7 years ago
Community Champion
Sorry, I didn't read your original post thoroughly enough.
If you have a (dynamic) list with multiple filenames, don't use the Folder.Files-function, but instead the Excel.Workbook-function:
1) Convert your list with filepaths to a table
2) Add a custom column to that table with the following code:
Excel.Workbook(File.Contents([ColumnNameContainingPaths])){[Item="NameOfTheTables"]}[Data]You have to adjust the bolded parts and then just expand that new column.
- skurek7 years agoNew Memberthank you!