Sundaram Sridharan Posted March 27 Share Posted March 27 when I log into webplayer and then click on the + icon and click on "open local file" it opens a dialog box to pick a file from local client PC - how can I replicate this in an ironpython script through an action button? I need to do a bunch of file manipulations after i bring it in and hence need to go this route. Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted March 28 Share Posted March 28 Hi Sundaram, Not sure if an IronPyton script could do the above, but I know that one of our customers used a TERR script to load multiple .txt files from a specified local directory: #Name your path mypath <- "//Documents/Departments$/ABC/Spotfire/Spotfire Data/" #Find all files in the folder which match the pattern files <- list.files(path = mypath,pattern = "*.txt") options(warn=-1) # Create an empty data frame which will be your end result combined <- data.frame() #Loop through all files, read them and append them (via a rbind = row bind) to your result data frame for(file in 1:length(files)) { df <- read.table(paste(path,files[file],sep=""),header=T,sep=';') combined <- rbind(combined,df) } There is also python code available, that could do the trick. You can find that page here. Kind regards, David 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