February 2022
Intermediate to advanced
182 pages
4h 25m
English
The last objective is to programmatically move the faster.mp3 file into the GoogleDrive folder that was created when Rclone was configured in Rclone. To do so, call upon Python’s built-in shutil library to move and rename the file. Create a movefile.py Python script in the same directory as the faster.mp3 file and use the following code to move the file into the GoogleDrive folder:
| ① | from pathlib import Path |
| | import platform |
| | import shutil |
| | |
| ② | homedirectory = str(Path.home()) |
| | |
| ③ | if platform.system() == 'Windows': |
| | syncfolder = '\\GoogleDrive\\' |
| | else: |
| | syncfolder = '/GoogleDrive/' |
| | |
| ④ | mp3name = "faster.mp3" |
| | |
| ⑤ | mp3destination = homedirectory + syncfolder + mp3name ... |
Read now
Unlock full access