Sign in to follow this  
Followers 0
stev379

New Folder icon Windows Explorer Vista

3 posts in this topic

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!!

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0