下载&上传
前言 没什么用,闲出来的…… 此下载只适用于xy.z格式的文件(x是前缀,y是递增的数字,z是文件扩展名)。 代码 下载 import os import time import requests from tqdm import tqdm # 记录开始时间,用于计算下载过程的耗时 start_t
前言 没什么用,闲出来的…… 此下载只适用于xy.z格式的文件(x是前缀,y是递增的数字,z是文件扩展名)。 代码 下载 import os import time import requests from tqdm import tqdm # 记录开始时间,用于计算下载过程的耗时 start_t
该Python脚本实现了文件重命名、移动和上传至阿里云盘的功能。首先,根据指定的前缀和扩展名对目录下的文件进行重命名,命名规则为前缀加三位数字后缀。接着,将重命名后的文件移动到指定目录。最后,脚本将文件上传至阿里云盘的指定文件夹,确保目录结构完整。整个过程通过读取和更新JSON文件中的计数器值来管理文件命名顺序。
依赖 sudo yum groupinstall -y "Development Tools" sudo yum install -y epel-release sudo yum install -y wget zlib-devel bzip2 bzip2-devel readline-devel
This Python script renames files in a specified directory based on a prefix and file extensions. It uses a record file to keep track of the renaming count, ensuring unique names for each file. The script supports multiple file extensions and updates the count after renaming each file.
This Python script renames images in a specified directory and records the changes in Excel files, supporting both prefixed and non-prefixed naming. The script uses a unique counting method to avoid duplicate filenames and saves renaming records for future reference.
This Python script backs up a specified directory, deletes certain files or directories, and compresses the backup into a ZIP file. It defines functions and paths for the original directory, objects to delete, backup directory, and zip file path, then executes the backup and deletion.
This Python function generates formatted markdown strings for inserting images with sequential names. It accepts a prefix, path, and a termination number (1-999) as inputs. The function formats the image filenames and paths, suitable for批量插入Markdown图片。
该文章提供了两个Python函数用于批量重命名图片文件,并按时间升序排列。第一个函数`rename_file`接受目标目录、输出目录和是否覆盖参数,第二个函数`rename_file`接受前缀参数以添加自定义前缀。两个函数均支持覆盖原有文件或另存新文件。
This Python script renames and reorders image files in a specified directory based on their modification time. It supports both prefix-less and prefix-based renaming. The script copies the files to an output directory with new names sequentially from 001.
This article provides a guide for packaging Python scripts into standalone executable files using PyInstaller. It covers how to install the tool, create a script with functions to detect duplicate files, and package the script into a .exe file. The process is ideal for distributing and running Python applications on Windows platforms.