Series |
---|
Part 4: Building on our Media Management Script with Checksum Verification
In Part 3 we built a custom media management tool, copying files from a source folder into a destination folder. In this Insight we’ll expand upon that script to incorporate checksum verification, plus adding multi-color fonts to make reporting a bit easier to read.
About this Insight
When copying media from set – or between facilities and hard drives – it is important to ensure that each subsequent copy is identical to its source. A checksum creates a hash describing the data as it is stored at a specific location. By creating a checksum for both the source and destination files, after copying has been completed, we can be sure both sets of files are identical.
Our media copying Python script will add checksum verification and report back any failures.
Key Python functions and libraries I’m covering today include:
- xxhash – a fast and secure way to generate a checksum
- pip – a package installer for Python
Different ASCII escape sequences:
To improve readability when generating reports check out these color values:
Key takeaways from this Insight
By the end of this Insight, you should understand how to:
- Using lists to store source-destination file path pairs
- Install external libraries using pip
- Calculate the checksum of files
- Check if files exist
- Color console messages using ASCII escape sequences
External Links
Related Insights
- Learning Silverstack Part 3: The Offload Wizard – for those wanting to dive deeper into data management, DIT Ryan Nguyen elaborates on industry best practices, as well as the many different formats of checksums.
Questions or Comments? Leave a comment!
How are your coding skills developing? Do you have questions about the work we’ve done so far? Let me know!
– Kaur
Member Content
Sorry... the rest of this content is for members only. You'll need to login or Join Now to continue (we hope you do!).
Need more information about our memberships? Click to learn more.
Membership optionsMember Login