'Get Drive File Link Using Python [closed]

I have many audio files in one folder and I want links of that files and want to paste into the data frame, for one file it's possible to copy the link, but there are 10000 files, so is there any code to automate this in python ?

Click for the image



Solution 1:[1]

You Could Always use pyautogui and manually adjust it if you dont know how to use it just refer to this https://www.geeksforgeeks.org/mouse-keyboard-automation-using-python/ and then if the drive link is copied to clipboard just add the pyperclip module and then link = pyperclip.paste() print(link) I guess this answers!

Solution 2:[2]

import os
d = "dir"
for path in os.listdir(d):
    full_path = os.path.join(d, path)
    if os.path.isfile(full_path):
        print full_path

Enter the directory you want to search and then replace the print with your code to add them. Cheers!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maybe Lindow
Solution 2 Edward Knueppel Jr.