Changing file names directly through the operating system by hand is easy but sometimes we just need a python program to take a look at the file system or we need python to change file names. Especially when we are dealing with many files that follow a certain structure, it can be useful to simply loop through a list of files with python.
To change file names we use the os module, which stands for operating system. The os module gives us functions that allow us to get information from the operating system we are working on and do things that an operating system usually does from python.
These functions have real consequences on your operating system so you should use them responsibly. Otherwise you could be deleting important files by accident.
In this video we use the functions os.listdir to get a list of objects that are in a directory and os.rename to rename files.
Python os documentation:
https://docs.python.org/3/library/os....
Auf dieser Seite können Sie das Online-Video How To Change File Names With Python - Python Tutorial #13 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer DMK Data 25 März 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 951 Mal angesehen und es wurde von 9 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!