Python Forum
[PyGUI] DataTransferApp - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: [PyGUI] DataTransferApp (/thread-11989.html)



DataTransferApp - mhaveliwala82 - Aug-03-2018

Hi, I am a new in python, I am trying to make a program for data transfer and i am trying to detect all the present drives and external drives attached to computer. also i want to navigate drives as Source and select files and folders to copy. and also want to make selection for destination and have ability to create a folder and select the path to paste on destination. and user should have ability to select and navigate through selectors. please anyone can share idea how i can start and what module i need to use. Thank You.


RE: DataTransferApp - Larz60+ - Aug-03-2018

On windows,
win32api.GetLogicalDriveStrings()
will return a list of connected drives.
Linux dosen't use drive letters
you can list \run\media\user (replace user with user name)
that will show devices that are mounted, but this most likely will not include all available devices.
You can list disk partitions, but it's a delicate procedure so tread lightly see: https://www.cyberciti.biz/faq/linux-list-disk-partitions-command/
also /dev/disk/by-label but again, I don't think they show if not mounted.