Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / June 2004



Tip: Looking for answers? Try searching our database.

opening folders

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ikh1@cornell.edu - 28 Jun 2004 19:54 GMT
Hello,

I'd like to streamline a daily repetitive task, and I was hoping someone could
show me how to do this.  Several times a day I need to open 3 different
folders (always the same 3), and also open a command prompt window in which I
always go to the same directory.  I've already created desktop shortcuts for
the folders and a .bat file to change directories in the command prompt
window, but I was wondering if it would be possible to put all of this into a
Visual Basic executible file.

I know this is kind of a whim, but it would be nice to have.  So I'm just
asking in case it's easy to do and you know it off the top of your head, or
could point me to a web page that shows how to do something similar.

Thanks.
Paul Hill - 29 Jun 2004 10:24 GMT
> Hello,
>
[quoted text clipped - 5 lines]
> window, but I was wondering if it would be possible to put all of this into a
> Visual Basic executible file.

You can open folders from a batch file.  e.g.

START "C:\MY FOLDER1\"
START "C:\MY FOLDER2\"
START "C:\MY FOLDER3\"
C:
CD \Whatever

Signature

Paul

Frank Adam - 29 Jun 2004 11:54 GMT
>Hello,
>
[quoted text clipped - 9 lines]
>asking in case it's easy to do and you know it off the top of your head, or
>could point me to a web page that shows how to do something similar.

Thanks to few beers i do feel a bit off the top of my head so
herewego..

dim ret as long
ret = ShellExecute(0,"explore",path1,vbnullstring,path1,1)
ret = ShellExecute(0,"explore",path2,vbnullstring,path2,1)
ret = ShellExecute(0,"explore",path3,vbnullstring,path3,1)
ret = ShellExecute 0,"open",environ$("comspec")," /p",cmdPath,1

That should do it, methinks. Replace path1,path2,path3 and cmdPath
with your paths. Also don't forget to include the ShellExecute
declaration.

Signature

Regards, Frank

ikh1@cornell.edu - 30 Jun 2004 16:26 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.