jssrecording 3 Posted August 26, 2016 Report Share Posted August 26, 2016 I have 2 CSV files that I need to move from the Download folder to the Desktop daily. The files have random names that will change daily. I didn't see it in the http://wiki.ubotstudio.com/wiki/Move_File documentation. Example: File 1 Vqyl6A20160823211456.csv File 2 IqSDM820160823211450.csv Cheers and all the best Ubot Community! Jason Quote Link to post Share on other sites
pash 504 Posted August 26, 2016 Report Share Posted August 26, 2016 1. use get file command to list http://wiki.ubotstudio.com/wiki/Get_Files2. create loop list3. inside loop use move file command http://wiki.ubotstudio.com/wiki/Move_File clear list(%OriginalFiles) add list to list(%OriginalFiles,$get files($special folder("My Documents"),"Yes"),"Delete","Global") set list position(%OriginalFiles,0) loop($list total(%OriginalFiles)) { move file($next list item(%OriginalFiles),$special folder("Desktop")) } Quote Link to post Share on other sites
jssrecording 3 Posted August 26, 2016 Author Report Share Posted August 26, 2016 1. use get file command to list http://wiki.ubotstudio.com/wiki/Get_Files2. create loop list3. inside loop use move file command http://wiki.ubotstudio.com/wiki/Move_File clear list(%OriginalFiles) add list to list(%OriginalFiles,$get files($special folder("My Documents"),"Yes"),"Delete","Global") set list position(%OriginalFiles,0) loop($list total(%OriginalFiles)) { move file($next list item(%OriginalFiles),$special folder("Desktop")) } I can't use "Downloads" as my $special folder that's where the files get downloaded too. I think I understand the rest of the loop. Thanks in advance! Quote Link to post Share on other sites
pash 504 Posted August 26, 2016 Report Share Posted August 26, 2016 I can't use "Downloads" as my $special folder that's where the files get downloaded too. I think I understand the rest of the loop. Thanks in advance!try set(#DownloadFolder,$replace($special folder("Desktop"),"Desktop","Downloads"),"Global") Quote Link to post Share on other sites
jssrecording 3 Posted August 26, 2016 Author Report Share Posted August 26, 2016 try set(#DownloadFolder,$replace($special folder("Desktop"),"Desktop","Downloads"),"Global") Worked! Thanks a billion Fellow UBotter! 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.