orbital 15 Posted July 24, 2012 Report Share Posted July 24, 2012 I want to specify a folder for ubot to look in for plr articles. Then I want it to open the first txt file in the specified folder, select all, copy then paste it into a wysiwyg editor on my webpage then hit saveThen open the next txt file and select all, copy and paste it into the second wysiwyg editor on my webpage and so on and so forth for 10 articles. How do I do this? Quote Link to post Share on other sites
suntattood 0 Posted July 24, 2012 Report Share Posted July 24, 2012 You might be able to do it by getting a specific keyword from a certain text file, but not sure how to make it random. Quote Link to post Share on other sites
orbital 15 Posted July 25, 2012 Author Report Share Posted July 25, 2012 So I made a short screencast illustrating what I mean by looping through text files within a folder. Is this possible with ubot? http://screencast.com/t/RsyFfINxIMK Quote Link to post Share on other sites
blumi40 222 Posted July 25, 2012 Report Share Posted July 25, 2012 set(#path, "C:\\Users\\yourPhat", "Global")add list to list(%MyFiles, $get files(#path, "No"), "Delete", "Global")loop($list total(%MyFiles)) { set(#file, "{#path}\\{$next list item(%MyFiles)}", "Global") add list to list(%file, $list from file(#file), "Delete", "Global") comment("DO WHAT EVER U WANNA DO HERE")} try this Quote Link to post Share on other sites
orbital 15 Posted July 26, 2012 Author Report Share Posted July 26, 2012 set(#path, "C:\\Users\\yourPhat", "Global")add list to list(%MyFiles, $get files(#path, "No"), "Delete", "Global")loop($list total(%MyFiles)) { set(#file, "{#path}\\{$next list item(%MyFiles)}", "Global") add list to list(%file, $list from file(#file), "Delete", "Global") comment("DO WHAT EVER U WANNA DO HERE")} try this thanks for that help. I am getting a problem with the apostrophes are getting replaced with a weird black diamond shape in the file it is reading. Is there a way to fix that? Quote Link to post Share on other sites
blumi40 222 Posted July 26, 2012 Report Share Posted July 26, 2012 okayi thing thats because of Encodeingformatubot use utf8 windowsmaschines use ANSI in this case i would try this.... (depence on whats your skills with dos-promt) create with notepad a new textdocument save this document as yourname.txton the saveoption in notepad u can change the encodeingformat to utf8 open a dos-promt (cmd.exe)walk to your documentroot where all the lists in (like: cd c:\user\me\mydocs\mylists)then u can fillup your newUTF8 created yourname.txt file whit this command dir > "c:\thePathToTheFile\yourname.txt" maybe if u open yourname.txt u have to clean some things too but u can do that easy with search/replace in Notepad. after that u can load the file into ubot instead of add list to list(%MyFiles,$get files(#path,"No"),"Delete","Global") useadd list to list(%MyFiles, $list from file(c:\pathToTheFile\yourname.txt"), "Delete", "Global") hope that helps u by the waytry to save your lists in a clear format no specialcharakters wrong -> this is my super dok.txtfine -> this_is_my_super_dok.txt http://www.ubotstudio.com/forum/public/style_emoticons/default/tongue.gifhttp://www.ubotstudio.com/forum/public/style_emoticons/default/wink.gifhttp://www.ubotstudio.com/forum/public/style_emoticons/default/smile.gifhttp://www.ubotstudio.com/forum/public/style_emoticons/default/biggrin.gif 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.