open folder

44 views
Skip to first unread message

sumanth shenoy

unread,
Jul 14, 2015, 5:47:36 AM7/14/15
to python_in...@googlegroups.com
hi guys i am new to python and i just trying out basic stuff 

i am trying to open a folder in the server with a click of a button 

i tried this 

import subprocess

def File ():
   subprocess.Popen('explorer "\\**server\D\***\fbx\**\**"') 

but it only works for local drives is there a way to make it work from any path

thank you for your time  
micheal

Fredrik Averpil

unread,
Jul 14, 2015, 2:22:23 PM7/14/15
to python_in...@googlegroups.com
Does that 'explorer' command work outside of Python?

Not entirely sure what you want to achieve but have a look at glob for searching for files/folders: https://docs.python.org/2/library/glob.html

// F
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CACcyz3a8rOdOQQaNPucWYNdyY4G-2ayaP3gTbYgFJcYOQVRWsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

cosku

unread,
Jul 14, 2015, 5:27:37 PM7/14/15
to python_in...@googlegroups.com
I think you need to escape those backslashes
\\\\server\\directory


-Cosku Ozdemir

CG Supervisor, Robotika Films
Maçka Talim Yeri Sok. 8/1, Maçka, İstanbul / Turkey
t: 2122277230   ///   f: 2122277231



Reply all
Reply to author
Forward
0 new messages