Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramonunch/ssname
Generate and set 8.3 short name automatically for NTFS under Windows, if short name is missing.
https://github.com/ramonunch/ssname
ntfs ntfs-3g shortname windows
Last synced: 14 days ago
JSON representation
Generate and set 8.3 short name automatically for NTFS under Windows, if short name is missing.
- Host: GitHub
- URL: https://github.com/ramonunch/ssname
- Owner: RamonUnch
- Created: 2021-10-14T18:35:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-06T14:26:06.000Z (over 2 years ago)
- Last Synced: 2024-11-07T13:18:33.810Z (2 months ago)
- Topics: ntfs, ntfs-3g, shortname, windows
- Language: C
- Homepage:
- Size: 31.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ssname
Generate and set 8.3 short name automatically for NTFS under Windows, if short name is missing.
```
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* SSNAME: Set short name automatically under windows NT (8.3 DOS name) *
* VERSION 1.2 Tested under Windows XP and Windows 7. *
* Copyright 2021 Raymond GILLIBERT *
* I wrote this program to re-generate shortnames automatically after *
* copying some files under Linux using NTFS-3G. *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* Usage: ssname.exe "long file name.extension" *
* If a valid short-name already exists it does nothing, otherwise it *
* will find an available shortname and set it. *
* It relyes on the SetFileShortNameW(), Windows XP/2003+ and later *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* Note that it will start at ~0 and go up to ~ZZ (Base 36) *
* This is bad code I wrote in one night with some good drink..... *
* Since 1.1 you no longer need to prefix \\?\ to a path in order to *
* use long-path names (UNC sized up to ~32kB). *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* This file is under the DWTFPL. *
* DO WHAT THE FUCK YOU WANT WITH THIS SOFTWARE *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
```
exemple:
```
> ssname.exe "Ùn fiçhié kì è trop.léong"
SSHORT-NAME SET TO: NFIHIK~0.lon
```
This is usefull to be used in a for loop to regenerate all short file names:`> for %i in (*.*) do ssname "%i"`
If you want to regenerate short names for all files in current directorry.
Use: `> for /R [/D] %i in (*.*) do ssname.exe "%i"`
To make a recursive loop to include all files in sub-dirs.
Add the `/D` flag to selec folders (dirs).
Note that with the /R flag the full-path-name is supplied by cmd.exe.The point compared to `fsutil file setshortname ` is that short-name is generated automatically.