file1 = pick file(); file_name = ... suff = word(-1, file_name, ".") if(suff == "txt" | file_name == “csv”, open(file1), .... );
how can i get file_name when I pick up a file?
Go to Solution
Variable "file1" contains the path.
The filename can easily be extracted with
file_name = Word( -1, file1, "/" );
View solution in original post
I am feeling so exited to have your reply!
If I like to get the path of file1, what shall I do?
I think this is what you really want
file1 = pick file(); file_name = Word( -1, file1, "/" ); suff = word(-1, file_name, ".") if(suff == "txt" | stuff == “csv”, open(file1); );