尧图网站建设 尧图网络
  • 首页
  • 关于我们
  • 服务项目
  • 案例展示
  • 建站流程
  • 资讯中心
  • 联系我们
首页/资讯中心/详情

Automatically Naming the Screenshots to Steam

Automatically Naming the Screenshots to Steam
📅 发布时间:2026/6/20 12:26:51

Automatically Naming the Screenshots to Steam

The Problem

I want to upload my own screenshot to steam, but I found that the methods I found are a bit tedious.

Steam expects screenshots to follow a specific naming convention in its screenshot and thumnails folders:

YYYYMMDDHHMMSS_N.jpg

Where:

  • YYYYMMDDHHMMSS is the timestamp
  • N is a sequence number
  • .jpg is the required file format

Solution

I wrote a Python script to automate this process

import os
import shutil
from PIL import Image
from datetime import datetimedef copy_images(source_folder, destination_folder, resize_thumbnails=True, thumbnail_size=(200, 125)):"""Copy all image files from source folder to destination folder with timestamp-based naming.Optionally create thumbnails in a subfolder.Args:source_folder (str): Path to source folder containing imagesdestination_folder (str): Path to destination folderresize_thumbnails (bool): Whether to create thumbnailsthumbnail_size (tuple): Size for thumbnails if enabled"""image_extensions = ('.jpg', '.jpeg', '.png', '.bmp', '.gif', '.tiff')os.makedirs(destination_folder, exist_ok=True)if resize_thumbnails:thumbnails_folder = os.path.join(destination_folder, 'thumbnails')os.makedirs(thumbnails_folder, exist_ok=True)copied_files = 0sequence_number = 1  # Starting sequence number# Get current timestamp in YYYYMMDDHHMMSS formattimestamp = datetime.now().strftime("%Y%m%d%H%M%S")for filename in os.listdir(source_folder):if filename.lower().endswith(image_extensions):source_path = os.path.join(source_folder, filename)try:new_filename = f"{timestamp}_{sequence_number}.jpg"destination_path = os.path.join(destination_folder, new_filename)with Image.open(source_path) as img:if img.mode in ('RGBA', 'P'):img = img.convert('RGB')img.save(destination_path, 'JPEG', quality=95)copied_files += 1print(f"Saved: {new_filename}")if resize_thumbnails:thumbnail_path = os.path.join(thumbnails_folder, new_filename)thumb = img.copy()thumb.thumbnail(thumbnail_size)thumb.save(thumbnail_path, 'JPEG', quality=90)print(f"Created thumbnail: {new_filename}")sequence_number += 1except Exception as e:print(f"Error processing {filename}: {str(e)}")print(f"\nDone! Saved {copied_files} images to {destination_folder}")if resize_thumbnails:print(f"Created thumbnails in {thumbnails_folder}")if __name__ == "__main__":# Example usagesource = "C:\\Users\\miyas\\Pictures\\VRChat\\SELECT" # change to your pathdestination = "X:\\steam\\userdata\\861267303\\760\\remote\\438100\\screenshots" # change to your pathcopy_images(source, destination, resize_thumbnails=True)

How to Use the Script

  1. Install Requirements:

    pip install pillow
    
  2. Edit the Paths:

    • Change source to your screenshot folder
    • Change destination to your Steam screenshots folder (usually in steam/userdata/[yourID]/760/remote/[appID]/screenshots)
  3. Run the Script:

    python upload.py
    

    After the process done, restart steam and you will see the customized pictures in the screenshot manager.

Key Features

  1. Automatic Timestamping: Uses current time for proper Steam format
  2. Format Conversion: Converts all images to JPG automatically
  3. Thumbnail Generation: Creates 200x125 thumbnails in a subfolder

本文来自博客园,作者:K1øN,转载请注明原文链接:https://www.cnblogs.com/kion/p/19106069

相关新闻

  • 穷举法(c语言版)
  • 详细介绍:深入理解Kafka事务
  • Python - GaussDB table sync to Hive

最新新闻

  • 使用acme.sh获取免费泛域名SSL证书:从DNS验证到自动化部署
  • 2026年6月最新天梭中国官方售后热线服务电话客户地址网点 - 天梭服务中心
  • 2026上海黄金变现去哪靠谱?本地5家正规回收渠道深度拆解,第1家真的全能无短板 - 速递信息
  • 基于ACME协议的SSL证书自动化管理:从原理到实践
  • DeepSeek-V4架构解析:DSA稀疏注意力与MoE路由实战
  • 开源推理模型本地部署实战指南

日新闻

  • 信任的进化:技术实现详解——如何用JavaScript构建博弈论模拟器
  • Terrakube自定义工作流:如何集成OPA、Infracost等工具扩展IaC能力
  • grunt-concurrent快速入门:5分钟学会并行运行Grunt任务

周新闻

  • 3步解锁iOS设备:applera1n激活锁绕过完全指南
  • 39 2026 人工智能证书终极盘点,普通人选 AI 证书可以从这些方向入手
  • Redis 暴露公网有多危险?从端口检查到补救步骤

月新闻

  • 【总结】入门篇:50句话让你记住架构核心概念
  • WeChatMsg技术方案解析:实现Mac微信数据自主管理的完整解决方案
  • WeChatMsg:革新性微信数据备份方案,打造你的专属数字记忆库

关于尧图

  • 公司简介
  • 团队介绍
  • 企业文化
  • 荣誉资质

服务项目

  • 定制开发
  • 电商建站
  • UI 设计
  • 运维服务

快速链接

  • 案例展示
  • 建站流程
  • 常见问题
  • 资讯中心

联系方式

  • 📍北京市朝阳区互联网产业园 A 座 10 层
  • 📞400-888-8888
  • ✉️contact@rkmt.cn
  • 🕐周一至周日 9:00-21:00

© 2024 北京尧图网络科技有限公司 版权所有 | 京 ICP 备 XXXXXXXX 号