save-c
将 C 盘目录迁移到 D 盘并创建目录软链接(symlink),安全释放 C 盘空间。
先完整拷贝到 D 盘,确认成功后删除 C 盘原目录,再创建软链接指回 D 盘。 拷贝出错时自动清理残缺文件,不会留下脏数据。
安装
pip install save-c
或开发模式安装(编辑后即时生效):
pip install -e .
用法
交互模式
直接执行 savec,按提示输入路径:
savec
命令行模式
savec C:\Users\xxx\AppData\Roaming\SomeApp
模拟运行(不做任何实际修改)
savec C:\Users\xxx\SomeDir --dry-run
跳过确认
savec C:\Users\xxx\SomeDir --force
自定义 D 盘保存目录
savec C:\Users\xxx\SomeDir --dest-dir D:\my_moved
扫描模式(批量迁移)
扫描用户目录下的所有子目录,统计占用的磁盘空间,交互式选择要迁移的目录。
savec scan
扫描指定目录
savec scan -d C:\Users\xxx\AppData
扫描并模拟运行
savec scan --dry-run
配置
可以通过 GUI 配置关键内容,比如扫描目录以及迁移的目标目录等。
savec config
Python API
from savec import move_and_link
move_and_link("C:\\Users\\xxx\\SomeDir", dry_run=True)
from savec import scan_and_select_interactive
scan_and_select_interactive("C:\\Users\\xxx", dry_run=True)
安全说明
- 只允许操作 C 盘目录。
- 禁止迁移 Windows 系统目录。
- 拷贝失败自动回滚删除残缺文件。
- 删除原目录前会二次确认(除非
--force)。 - 创建和删除软链接、删除目录需要管理员身份运行。
许可证
Apache-2.0
Metadata
Release files for save-c 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| save_c-1.2.3.tar.gz | 15.2 kB | Without provenance | Details for save_c-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| save_c-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for save_c-1.2.3-py3-none-any.whl |
Total release size: 33.9 kB
Release files / save_c-1.2.3.tar.gz
| Download URL | save_c-1.2.3.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2170e0e0238a434c348ea82a3b245cdec2ed8cff98735222876ad00de9dd610
|
|
BLAKE2b-256 checksum How to use checksums |
04a736e544b0eb3befb38d0989a6dd2ae2454c3180a674434aa1d32894bc7ef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.9
|
Release files / save_c-1.2.3-py3-none-any.whl
| Download URL | save_c-1.2.3-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c38a6ee2db6cdb1c8166c73afba8033253ac3067a775a4dd87314ed64521e61e
|
|
BLAKE2b-256 checksum How to use checksums |
61930a1e03d0be9a238305c6ab845b5f76242ba2597bc0bcde69d44f1276c622
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.9
|
Security for save-c 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.