zinni 2 Posted June 30, 2011 Report Share Posted June 30, 2011 Hi, i will create a Upload Bot that Upload a File from Varibale Directory. Example: Step1 Bot Upload File from: D:\folder1\([A-Za-z0-9-]+)\folder2\file.zip Step2 Bot return finish Is this possible? Best RegardsZ!nni Quote Link to post Share on other sites
UBotBuddy 331 Posted June 30, 2011 Report Share Posted June 30, 2011 I am going to move this to the Regex sub-forum as it is a better place for your question. Quote Link to post Share on other sites
zinni 2 Posted July 1, 2011 Author Report Share Posted July 1, 2011 Can i do this with "$Get files" Command in a list or how work the "$Get files" Command? I have in Script Reference nothing found. Beste RegardsZ!nni Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 1, 2011 Report Share Posted July 1, 2011 get files will get the files in a specific folder.used normally with a add to list or add to table for saving to csv, text file, or using a list in your bot. Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 Does anyone have any idea, how I can implement the Regex in Folder? Best RegardsZ!nni Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 Does anyone have any idea, how I can implement the Regex in Folder? Best RegardsZ!nni Give an example what your trying to accomplish? Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 Here is a Example. The user will not need to specify the "unknown-directory".unknown-directory.ubot Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 you can check for the file to see if it exists. if it does proceed, else (do nothing or create it than proceed.) TJ Quote Link to post Share on other sites
JohnB 255 Posted July 2, 2011 Report Share Posted July 2, 2011 So Folder 1 and subfolder are known directories and the one between them is always going to be unknown? Logically, I can't really wrap my head around that, but in any event, the only way I was able to attempt that was unsuccessful. The $get files constant does not include subdirectories so there is no original text from which you can draw a $find regular expression. John Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 So Folder 1 and subfolder are known directories and the one between them is always going to be unknown? Logically, I can't really wrap my head around that, but in any event, the only way I was able to attempt that was unsuccessful. The $get files constant does not include subdirectories so there is no original text from which you can draw a $find regular expression. John I have create a Software, thats have a generated Folder. Thats the Unknown Folder. I have the Idea to create a *.bat file with this: dir /b folder.txt But Ubot Studio can`t run this :-( click i the *.bat manually than works fine. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 why have a bat, or anything other then ubot create the folder? if your targeting the desktop, or programs tree you should be able to create a folder anywhere you like. TJ Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 My Program have a file (file1.csv) in Unknown folder. I need this File. I will not create a folder or anything else. I need only the file1.csv thats my program have generated. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 My Program have a file (file1.csv) in Unknown folder. I need this File. I will not create a folder or anything else. I need only the file1.csv thats my program have generated. So have ubot create the file in a location that the bot can read from.ie: desktop, app folder, document folderand read from it. Delete when done if you like or it can remain there as the next time it is ran it will overwrite itself. TJ Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 I have do this but it dosn`t work with Ubot Studio. Example: Create a directory on Desktop with name: "folder1". Than create another directory with name: "folder2" run the .ubot file in my attachment and see it dosn`t work :-(unknown-directory.ubot Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 Try the attached. no need for shellno need for any the other ways you were trying..folder create save csv-lowridertj.ubot Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 It's not the same. I need a Ubot that uploading a file from a directory, which I do not know. I need a file from this Directory: %desktop%\folder1\any-name-of-directory\file.csv The any-name-of-directory is a Directory, wich name i not known. Best RegardsZ!nni Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 why does it have to be any name of a directory in that position? there could be multiple folders all with a csv in them. therefore it would continuously loop because it wouldn't know which one to choose, and or would only choose the first one it came across. To grab specific data is best to create the folder so that it is pin pointed exactly for the csv your needing. If it is a specific csv that is needed to be grabbed, then have it setup as a User Input (UI open file) command.thus giving the precise csv that is to be used. TJ Quote Link to post Share on other sites
zinni 2 Posted July 2, 2011 Author Report Share Posted July 2, 2011 why does it have to be any name of a directory in that position? I have create a Software, thats generate a User Directory. (example "1hfgfGGHbdUSER") In this Directory is a Stat file. (file1.csv) The user should not even write the path in a ui panel or file. It should be read automatically. I wanted to ask if this is possible? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 2, 2011 Report Share Posted July 2, 2011 so in your bot. the stat file that is generated you also set the folder it is saved in. therefore you can use a set command to set the variable of the folder name it is saved to. and call it at a later time to bring up the csv file. Quote Link to post Share on other sites
JohnB 255 Posted July 2, 2011 Report Share Posted July 2, 2011 Not to mention UBot can create a random folder name in the same manner. You don't need an external app for that. Quote Link to post Share on other sites
zinni 2 Posted July 3, 2011 Author Report Share Posted July 3, 2011 I have a existing Software, Coded with c++ and PHP. Thats Software generate the Random Folder. With Ubot Studio, i will automaticy the Software. But i need a function to read the random generated folder. Best RegardsZ!nni Quote Link to post Share on other sites
k1lv9h 76 Posted July 7, 2011 Report Share Posted July 7, 2011 zinni, I updated your example.zinni-unknown-directory-002.ubot Kevin 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.