how to open a windows folder?

B

Bell, Kevin

I'd love to be able to open up a windows folder, like c:\temp, so that
it pops up visually. I know how to drill down into a directory, but I
can't figure out how to open one up on screen. Would I have to make a
call to windows explorer in a similar way that I hit Excel with:

from win32com.client import Dispatch
Excel = Dispatch("Excel.Application")

Any clues?
 
N

N. Pourcelot

With module os, you may execute some files.
something like :
os.execl("explorer.exe", *arg)
(syntax ?)
you sould also be able to send some command to console.
 
L

Larry Bates

Not elegant but this works:

import os
os.system(r'start explorer.exe "C:\temp"')

-Larry Bates
 
L

Larry Bates

Not elegant but this works:

import os
os.system(r'start explorer.exe "C:\temp"')

-Larry Bates
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top