Access the Windows Explorer to select folder 
Author Message
 Access the Windows Explorer to select folder

Once upon a time I found a website that described how to access Explorer to
choose a file or folder. You could define where explorer opened, weather you
could move up the folder tree, and what kind of files showed up in the list,
and when you selected a file or folder and hit OK, that file or folder was
returned. Unfortunately, I don't remeber where I found that info.
Can anyone suggest a location? In my case, I want to fire up Explorer
looking at the users Favorites folder, and only showing folders. Ultimately
I am working on a SendToFavorites tool which allows me to right click a file
or folder, pick a folder within Favorites (and maybe even create new folders
in favorites) as a destination, and have a shortcut created there. Maybe
someone has already done this?

Regards,
Gordon



Fri, 19 Aug 2005 13:36:28 GMT  
 Access the Windows Explorer to select folder
While I'm at it, is there any way to quickly verify that a FileSpec is a
folder or a file? I need to handle each a little differently, and I would
like to do it gracefully. Right now I do
If FileExists Then
     yada yada
Else If FolderExists Then
    yada yada
End If

Which is fine, except half the yada yada is the same. I guess I could do a
function, but it seems like I should be able to identify if the FileSpec is
a file or folder, then set a flag variable, and do an if on ther flag as
needed.

Any suggestions are greatly appreciated.

Gordon



Fri, 19 Aug 2005 14:13:03 GMT  
 Access the Windows Explorer to select folder

Quote:

> Once upon a time I found a website that described how to access
> Explorer to choose a file or folder. You could define where explorer
> opened, weather you could move up the folder tree, and what kind of
> files showed up in the list, and when you selected a file or folder
> and hit OK, that file or folder was returned. Unfortunately, I don't
> remeber where I found that info. Can anyone suggest a location? In my
> case, I want to fire up Explorer looking at the users Favorites
> folder, and only showing folders. Ultimately I am working on a
> SendToFavorites tool which allows me to right click a file or folder,
> pick a folder within Favorites (and maybe even create new folders in
> favorites) as a destination, and have a shortcut created there. Maybe
> someone has already done this?

The following command should open up explorer to your Favorites folder
in NT/2k/XP, and set that folder as the root, i.e., you will only see
that folder and its subfolders in the explorer directory tree. If you
have moved your favorites folder to another location (with TweakUI or
the like) you'll have to edit the path accordingly.

explorer.exe /e, /root, %userprofile%\Favorites

You can create a shortcut to windows explorer and insert the above
command as the target in shortcut properties, and additionally assign
that shortcut to a hotkey for quick access, as long as the shortcut is
in your start menu or on the desktop. As far as SendTo options go, I
think that if you simply place a shortcut to the desired folders in your
SendTo folder, you will then be able to direct stuff to that folder.
Whoa, wait a minute now, I tried it and it seems to copy rather than
move when you use that approach, at least under XP. I'm not sure how
you'd get it to behave like the MyDocs drop target or the "Send to
desktop as shortcut" link. If someone else around here knows, I'm all
ears though.



Fri, 19 Aug 2005 15:04:30 GMT  
 Access the Windows Explorer to select folder


Quote:
> explorer.exe /e, /root, %userprofile%\Favorites

Thanks Brian. I am actually hoping to string it all together in script, so
the user right clicks on the file (actually files & folders, multiple items
allowed) and choose Send to Favorites, which is my WSH, which then fires up
Explorer with Favorites as the open folder. User picks the folder they want
the first file to go to (ideally the file name might be in the Explorer
dialog in some way?) and click OK. The script builds the shortcut, then
repeats for each argument passed, defaulting to the last used folder.

As a stopgap, I will probably just dump all of them in the root of
Favorites, then ask the user if they want to manage their Favorites, and use
your code to get them started if they do.

Best,
Gordon



Sat, 20 Aug 2005 02:58:39 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Navigate to folder in current Windows Explorer instance

2. Windows Explorer COM access for icon positions

3. accessing variables between windows in explorer

4. Create new folder in current folder in explorer window

5. Using File Exists on Windows Explorer and Windows Media player shortcuts

6. Using folder object when the user doesn't have access to the folder

7. using VBscript to access Access database in public folder

8. tree structure (expanding collapsing explorer folder style)

9. Shortcut to Explorer w/ Folder

10. getLocale in Internet Explorer does not return locale of Windows

11. MS Windows Explorer View (W98)

12. windows-explorer object-reference

 

 
Powered by phpBB® Forum Software