stev379 Posted September 29, 2008 Share Posted September 29, 2008 My searches didn't turn up what I'm lookng for. I apoligize if this has been done already. I'm trying to add a New Folder icon to the Windows Explorer toolbar or even a command bar ...or even the quick launch for a basic starting point. The New Folder code is easy enough except I haven't been able to get it to create the New Folder in the directory I'm actually in. Of course "@workingdir" creates the New Folder in the script directory even when I use a shortcut. Does anyone have tips on how to create a new folder in the actual directory I'm in? Example: Script is stored in E:\_Tech\Scripts\AutoIT\InProgress\CrtDir Shortcut to script is in the Quick Launch tool bar. I have Windows Explorer open to C:\TestDir1 I want to click the Quick Launch CrtDir.exe.lnk shortcut to create a "New Folder" in C:\TestDir1 Any ideas or suggestions are appreciated. I know this is bugging a lot of people. If nobody else has a solution yet, maybe we can find a decent one. I'm always open to better ways to write my existing code also. $DIRNAME = ("New Folder") If Not FileExists($DIRNAME) Then DirCreate($DIRNAME) Else $i=1 For $i=1 To 100 If FileExists($DIRNAME & ' ' & $i) Then $i=$i+1 DirCreate($DIRNAME & ' ' & $i) Exit Else DirCreate($DIRNAME & ' ' & $i) Exit EndIf Next EndIf Thanks!! Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 29, 2008 Share Posted September 29, 2008 Did you try @ScriptDir? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
stev379 Posted October 2, 2008 Author Share Posted October 2, 2008 Did you try @ScriptDir?Sorry for the delay. Caught the flu. Not as much fun as a Yeah, that'll come up the same as @workingdir returning the location where the script is stored. It needs to return the current location of the Windows Explorer window that has focus and the folder it's open to. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now