Using the ExecFile command or something similar is there a way to us BlitzPlus to open a folder at the root directory of the blitz or exe file you are running?
Folders
BlitzPlus Forums/BlitzPlus Programming/Folders What do you mean? Are you trying to, for instance, open a folder to be viewed in Windows Explorer? If so, then you might want to use the ExecFile command with some extra "command line" parameters - I'm not familiar with those myself, I think someone like Alaric or b32 should be able to help you out...
I think that you are looking for the currentdir$() command. Try this and see if it is what you want
print currentdir$() waitkey()
To open the folder, you can "ExecFile" a folder, or run Explorer.
I want to open the current directory. The currentdir$() command would be perfect if I could use it to specify what folder to open with explorer. I don't know how to do that so help would be appreciated.
simply use ExecFile() and set the file$ parameter to CurrentDir()
like this
like this
ChangeDir("c:") ExecFile(CurrentDir())
What is ChangeDir("c:\") for?
I tested Senzak's code and it was very close, but I need the command to open the Current Directory. NOT the C drive.
Chr(34) is " character and is needed if parameter contains spaces.
Without quotes "C:\Program Files\BlitzPlus\tmp\" it will run file "C:\Program" with parameters "Files\BlitzPlus\tmp\"
Without quotes "C:\Program Files\BlitzPlus\tmp\" it will run file "C:\Program" with parameters "Files\BlitzPlus\tmp\"
Print "Opening current (" + CurrentDir$() + ") folder..." ExecFile(Chr(34) + CurrentDir$() + Chr(34)) Print "Opening C:\ folder..." ExecFile("c:") Print "Opening BlitzBasic.com..." ExecFile("http://www.blitzbasic.com") Print "The End!" WaitKey
You dont need the
Hope this Helps....
ChangeDir("c:")in there, it was only to show that it did indeed open the current folder. To just open the current folder, just use
ExecFile(CurrentDir())....and i havn't tested it, but it looks like Andres advice with using
Chr(34)at the beginning and end would help too
Hope this Helps....
I want to open the folder that an item is saved in, not the folder that it is running through. If this helps, I am making a small application like U3, but without using the U3 software and formatting
I meant you could use ChangeDir() first to navigate to that folder, then when you used ExecFile(), it would open that folder
i have no idea what U3 is though
i have no idea what U3 is though
Another alternative is:
ExecFile "Explorer " + CurrentDir$()
ExecFile "Explorer " + CurrentDir$()
Thank you so much that works perfect. Oh and as a side comment, if you add .exe after explorer it opens internet expolorer.
I think not. Command that opens IE is "iexplore", but "explorer" opens explorer
try it
start -> run -> "iexplore" = Internet Explorer
start -> run -> "explorer" = Explorer
start -> run -> "explorer" = Explorer
have you tried it? I'm not sure if you know, but exefile and run are DIFFERENT!!!
Nope, I haven't tried it with ExecFile yet. I will when i get back to home.
EDIT:
Tried it now. They are different (maybe), but in this case they work the same as I told you.
EDIT:
Tried it now. They are different (maybe), but in this case they work the same as I told you.
it worked that way for me