We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,329 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

locate file or folder in windows explorer

How can i locate a file or a folder using python like some when we right click in downloaded files using firefox and open containing folder,and it opens the explorer and pre selects the file downloaded.

how can this functionaly be implemented using python standard library ?

however this code does opens the explorer for me, but doesn select the file specified..

import subprocess
subprocess.Popen('explorer "E://temp//"')
2
Contributors
1
Reply
1 Week
Discussion Span
5 Months Ago
Last Updated
2
Views
krystosan
Junior Poster
116 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

hey, try the following code:

import webbrowser as wb
wb.open('C:/foldername')

Good Luck!

extr3mex
Junior Poster in Training
70 posts since Jul 2009
Reputation Points: 7
Solved Threads: 4
Skill Endorsements: 6

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0622 seconds using 2.67MB