Kreatus (Ubot Ninja) 422 Posted July 1, 2011 Report Share Posted July 1, 2011 Here is the regex code to extract the filename from full path. extract filename.ubot I got this idea based on franks code here. So thank him for sharing this code. This started a whole lot of ideas. (?!\\).*?(?=\\) will search everything behind \then replace every \ with nothing. This will leave the filename only... This could be useful for some. 3 Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 1, 2011 Report Share Posted July 1, 2011 nice.. i was actually doing something like this today and was a lot more difficult process i took. +1 Quote Link to post Share on other sites
JohnB 255 Posted July 1, 2011 Report Share Posted July 1, 2011 I am not sure of the goal you guys have, or from where you are retrieving file names, but I just wanted make sure you knew the $get files command retrieves files with and without paths. John Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted July 2, 2011 Author Report Share Posted July 2, 2011 I am not sure of the goal you guys have, or from where you are retrieving file names, but I just wanted make sure you knew the $get files command retrieves files with and without paths. JohnYes John we are aware of that.. My main goal is to get the variable of uiopenfile filename only and save the file at the end of the bot with additional words in the filename or to save it on other location with the same filename.. For example: Original filename.txt Modified filename-keywords.txt filename-url.txt 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.