ed08724 6 Posted October 15, 2018 Report Share Posted October 15, 2018 Is there a way to retrieve a list of files matching a certain pattern such as *june.csvthanks Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted October 15, 2018 Report Share Posted October 15, 2018 Yes, a few ways, but here is one. comment("creates some test files") save to file("{$special folder("Desktop")}\\one.csv","test,one,two, three") save to file("{$special folder("Desktop")}\\two.csv","test,one,two, three") save to file("{$special folder("Desktop")}\\one.txt","test,one,two, three") divider comment("loads desktop files") clear list(%desktop files) add list to list(%desktop files,$get files($special folder("Desktop"),"Yes"),"Delete","Global") clear list(%csv files) loop($list total(%desktop files)) { wait(.1) set(#NLI,$next list item(%desktop files),"Global") comment("checks file extension") if($contains(#NLI,".csv")) { then { add item to list(%csv files,#NLI,"Don\'t Delete","Global") } } } Regards,CDchecks for csv.ubot Quote Link to post Share on other sites
ed08724 6 Posted January 14, 2021 Author Report Share Posted January 14, 2021 just curious what the purpose of the wait(.1) is? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.