1

I am using the following code to enable the user to chose a folder:

from tkinter import Tk
from tkinter.filedialog import askdirectory
path = askdirectory(title='Select Folder') # shows dialog box and return the path
print(path)  

However, the 'Browse' window does not display the Android phone connected via USB, although I can see it via windows explorer.

How can this be enabled?

Thingamabobs
  • 7,274
  • 5
  • 21
  • 54
gtomer
  • 5,643
  • 1
  • 10
  • 21
  • 1
    USB are different from ordinary directory and I don't think there is an built in tkinter option for you. I guess you need to query the serial port or **u**niversal **s**erial **b**us with a 3rd party modul. – Thingamabobs Sep 18 '22 at 19:42
  • 1
    What you could at least try is to set the initial directory to the USB and see if it works. – Thingamabobs Sep 18 '22 at 20:11
  • Strange why windows explorer can but python browse window cannot.... – gtomer Sep 19 '22 at 06:51
  • Does this answer your question? [Tkinter filedialog.askdirectory() can't find external drives](https://stackoverflow.com/questions/70154308/tkinter-filedialog-askdirectory-cant-find-external-drives) – Thingamabobs Sep 19 '22 at 13:32

0 Answers0