dr. dre 23 Posted July 3, 2011 Report Share Posted July 3, 2011 I have a folder with about 100 .txt files. I want to put all of the text from the files into 1 .txt file. It makes sense to use "$text from list", but how would I loop that?I tried LoopList total text from listnext list item.. would i use "replace" ? I also read somewhere on the forum how you could use a shell command to get all the text off of the files. Could someone point me in the right direction? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 3, 2011 Report Share Posted July 3, 2011 I will try to put together a example for you if someone else doesn't before tomorrow morning. Quote Link to post Share on other sites
UBotBuddy 331 Posted July 3, 2011 Report Share Posted July 3, 2011 There are a couple of ways to do it. I would try this first. 1. Setup a loop2. Load the first file into a List3. Save the list your new file for all of them4. Repeat the loop You're done! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 3, 2011 Report Share Posted July 3, 2011 here you go.. Will merge all files inside a folder you specify TJmerge files-lowridertj.ubot Quote Link to post Share on other sites
dr. dre 23 Posted July 3, 2011 Author Report Share Posted July 3, 2011 Really appreciate the quick response Buddy and TJ. Question TJ, In your bot, in the "add to list" node, the list "%looped" is only 1 file, will this loop pull the text from every(100) .txt files from the folder from the "$get files" folder? I will try it. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 3, 2011 Report Share Posted July 3, 2011 yes all the files from your folder are added to the first list. it adds the path to each file in a list in the first add to list. then it loops and grabs the data from each file in the &loop then saves it all to 1 text file. Quote Link to post Share on other sites
dr. dre 23 Posted July 3, 2011 Author Report Share Posted July 3, 2011 TJ, Dude, That worked too smooth!! I am going to take it apart and learn how everything worked, and i will also try what Buddy said. My goal is to learn everything about Ubot.Thanks again TJ. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 3, 2011 Report Share Posted July 3, 2011 no problem glad to help you.. Quote Link to post Share on other sites
dr. dre 23 Posted July 3, 2011 Author Report Share Posted July 3, 2011 Dude I love this stuff and I am so glad I found this on BHW! Quote Link to post Share on other sites
lucky 0 Posted August 1, 2011 Report Share Posted August 1, 2011 how can we add files to 1 file if we are using the ubot version 3.515? 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.