Python 101 For Post Production Professionals: Scripting Media Management Operations

March 12, 2024

In Part 3 of his series, Kaur Hendrikson dives into the deep end and teaches you to script a Media Management operation for copying files.


Series

Part 3: Creating the first script you might use in your business

In this Insight, we are moving beyond the simple calculator that introduced the core range of concepts to get you started with Python. Now, in Parts 3 & 4, we are writing a script that you can use in your day-to-day work… we are manipulating media files. You can think of this as a step-by-step guide on leveraging Python libraries to automate tedious file management tasks, offering the potential to transform mundane procedures into a structured and efficient process.

About this Insight

You will learn to write a Python script that facilitates the ingestion of files by copying and sorting them into designated folders based on their file extensions, such as WAV or BRaW files. You will also learn about ‘libraries’, how to invoke them and rename them for brevity in your coding, then import specific functions from those libraries.

Key Python functions and libraries I’m covering today include:

  • tkinter – A library for creating GUI elements, such as file dialogues, enables users to select source and destination folders easily.
  • os – A library for operating system interaction used for directory traversal and path manipulation. It’s essential for locating files within subfolders and generating new paths for sorted files. In this script, you learn to use os.walk, os.path.join, os.splitext, os.makedirs
  • Shutil – We use shutil.copy2 for file duplication. This function copies files while preserving metadata, an important feature for managing media files.
  • Plus many more – You’ll add additional functionality to this script so that it provides user feedback. You’ll invoke additional functions to count and total the number of files being processed.

These concepts are fundamental for any aspiring Python developer, especially those in post-production, looking to automate and enhance their file management system.


Member Content

Sorry... the rest of this content is for members only. You'll need to login or Join Now to continue (your career will thank you!).

Need more information about our memberships? Click to learn more.

Membership options
Member Login

Are you using our app? For the best experience, please login using the app's launch screen


Is your career calling out for help?

Answer the call with a Mixing Light Membership. Gain client-tested tips, workflows, and add new skillsets from our pro Contributors!


JOIN NOW! You don't have to do this alone!
Loading...