Cameron Berns Posted July 14, 2020 Share Posted July 14, 2020 I want to prompt the user to select the folder where the data of interest is located. Next, I want to extract all the files that end in .csv inside each seperate folder and build the data table. Lastly, I need to open another layer of folders and match the .jpeg names to a column in the previously built data table. Right now I can append and add the data tables but basically need help on how to build the file path from a multiselct of folders instead of .csv files. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted July 15, 2020 Share Posted July 15, 2020 in what language are you doing this Can you provide what you have so far, ideally with an example dxp Link to comment Share on other sites More sharing options...
Cameron Berns Posted July 15, 2020 Author Share Posted July 15, 2020 ofd = OpenFileDialog() ofd.Multiselect = Trueif ofd.ShowDialog() == DialogResult.OK: files = ofd.FileNames files = list(files) print files # NOTE: it stores the files paths for x in ofd.FileNames: #print(x) plogs.Add(Document.Data.CreateFileDataSource(x)) nlogs.Add(Path.GetFileName(x)) # NOTE: the Sysytem.IO .NET API is needed here** Right now this will print the file paths but I need to know how to start in a folder and then use reg ex. to navigate into each folder and populate the data table with the embedded "....csv" file(s). Link to comment Share on other sites More sharing options...
Gaia Paolini Posted July 15, 2020 Share Posted July 15, 2020 what does the target data table look like I don't understand the matching of columns. Please provide enough information to reproduce your use case Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now