Jan-18-2020, 02:45 PM
Your posted error code was a
The path you've used is a path for Windows systems.
On a linux system you don't have a drive letter.
All absolute paths begins at
Usually you run on linux your scripts as a user like on Windows.
So your Backupdata could be in /home/your_user_account/Backupdata
(On Windows it is C:\Users\your_user_account\Backupdata)
Using the pathlib, allows you to handle paths on windows, mac and linux in right way.
If you want to make your script os independent with the use of Path:
then the resulting directory on Linux is: /home/FooBar/Backupdata
And on Windows: C:\Users\FooBar\Backupdata
OSError: [WinError 123]
The path you've used is a path for Windows systems.
On a linux system you don't have a drive letter.
All absolute paths begins at
/
(the root directory).Usually you run on linux your scripts as a user like on Windows.
So your Backupdata could be in /home/your_user_account/Backupdata
(On Windows it is C:\Users\your_user_account\Backupdata)
Using the pathlib, allows you to handle paths on windows, mac and linux in right way.
If you want to make your script os independent with the use of Path:
my_backup_dir = Path.home() / "Backupdata"If your user home directory is named for example
FooBar
,then the resulting directory on Linux is: /home/FooBar/Backupdata
And on Windows: C:\Users\FooBar\Backupdata
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!