lucky 0 Posted July 29, 2011 Report Share Posted July 29, 2011 Hi, I am very new to ubot and I have been searching this forum for a few days already. Here is the flow, I will have several files in a folder. I have here ubot studio 3.515 and it doesn't have $get files command. SO I was thinking,is it possible to have a bat file that contains a command which will allow you to read the files in a folder? That is why I was also thinking of how to open a directory of folder and sub folders in hierarchy which will not show the contents just the folder. Because I can maybe select the source folder of articles then read the files through the bat file and add the titles of the articles to a list. Thanks and hope for your immediate response. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 29, 2011 Report Share Posted July 29, 2011 yes a bat can do thathttp://liveslick.com/2007/10/18/make-a-directory-list-with-the-command-prompt-in-seconds/ 1 Quote Link to post Share on other sites
lucky 0 Posted July 29, 2011 Author Report Share Posted July 29, 2011 thanks for the reply. how can i use shell command to make that work? i was thinking to save that c:\folder1\forder2...on a notepad and save it as a .bat file. so i was thinking to use the shell command and browse for that file..that file by the way should be pasted on the ubot folder on program files? Quote Link to post Share on other sites
JohnB 255 Posted July 29, 2011 Report Share Posted July 29, 2011 yes a bat can do thathttp://liveslick.com...mpt-in-seconds/ Great info TJ! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 29, 2011 Report Share Posted July 29, 2011 thanks for the reply. how can i use shell command to make that work? i was thinking to save that c:\folder1\forder2...on a notepad and save it as a .bat file. so i was thinking to use the shell command and browse for that file..that file by the way should be pasted on the ubot folder on program files? have it save the files in that directory to a text file and then you can use that in your ubot coding as a list as needed to pull up each file adding the directory path to the beginning of each list item, and then read from file, and alter as needed. TJ Quote Link to post Share on other sites
lucky 0 Posted July 29, 2011 Author Report Share Posted July 29, 2011 would it be easier if i convert the text files into csv? I havent find any resource yet on how to do the conversion. Is it possible if i convert the multiple text files into a csv by reading its content and transfer it there.I will do the find and replace of keywords on the csv then after convert it back to individual text files. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 29, 2011 Report Share Posted July 29, 2011 you could add each file to a list, replace keywords and re-save the file. Even though a list is used per line It will read you file per line. therefore generating the exact same thing within a list. So add the article to a list, replace the keywords, then save the new article.Clear list, and start next article looping through all articles your trying to do this for. TJ Quote Link to post Share on other sites
lucky 0 Posted July 31, 2011 Author Report Share Posted July 31, 2011 thank you for the reply.i will start revision now Quote Link to post Share on other sites
lucky 0 Posted July 31, 2011 Author Report Share Posted July 31, 2011 Hi, By the way, I have ubot 3.515 and it doesnt have get file from folder command. What is the easiest way to get the files and its content to a csv? Is it possible to create a .bat which can read the contents of the folder and write its contents to 1 file? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 31, 2011 Report Share Posted July 31, 2011 yes a example of a bat , shell was given above. Quote Link to post Share on other sites
lucky 0 Posted August 1, 2011 Author Report Share Posted August 1, 2011 yes, i have tried the example given above and it gives just the file title in the directory. IS it possible if it also display the content of each file and merge it in 1 file? i have seen your response about merging files in 1 file but it is for version 4 that has open folder.. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 1, 2011 Report Share Posted August 1, 2011 if thats the case have the shell save a list of the file names, loop that in ubot adding the path in front of each file name, then you can open each and edit them as needed. 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.