Skip to content

Automation Tutorials

On this page, you’ll find all the tutorials related to automating your operating system and finding ways to streamline your everyday tasks.

  • How to Get File Size in Python in Bytes, KB, MB, and GB
    When working with files programmatically, you’ll often want to know how large a file is. This can be helpful when transferring files or copying files. Python provides a number of built-in methods of doing this, including using the os and pathlib libraries. Depending on your preference, either of these approaches works well. By the end
  • Python: Create a Directory if it Doesn’t Exist
    In this tutorial, you’ll learn how to use Python to create a directory if it doesn’t exist. Creating directories programmatically can save you a ton of time. However, not checking if the directory exists first can lead to significant problems, such as deleting files. By the end of this tutorial, you’ll have learned: How to
  • How to Resize Images in Python using Pillow
    In this tutorial, you’ll learn how to resize an image in Python using the Pillow library. You’ll learn how to resize individual images and multiple images in bulk. You’ll also learn how to specify a percentage to scale by, a maximum width, and a maximum height. By the end of this tutorial, you’ll have learned:
  • Using Environment Variables in Python
    In this post, you’ll learn about how to use environment variables in Python on Windows, macOS, and Linux. Environment variables in Python enable you to write smoother workflows and more secure code. You’ll learn why environment variables are useful to learn and how to implement them. You’ll learn how to get and set environment variables