- Clone the repo with:
git clone [email protected]:Kolobamanacas/FileNamesShortener.git
. - Open
FileNamesShortener.sln
with Visual Studio. - Choose preferable mode (debug/release) and CPU architecture or just leave everything as it is.
- Build the solution using menu Build > Build solution or by pressing F6.
- Built application should appear in
\FileNamesShortener\bin\[Debug/Release]\net7.0\
folder.
- Open PowerShell/Command Prompt terminal in a folder where the app is located.
- Run
FileNamesShortener.exe -path '[PathToFolder]' -prefix-length [NumberOfCharacters]
, where[PathToFolder]
is path, where files, which names you wish to shorten are located and[NumberOfCharacters]
is how much characters of the original file name you wish to leave untouched (file extension is never removed). Passing 0 will remove everything except from extension.
Important! When the application is provided with a path to a folder, it will rename all files in the folder and it's subfolders.
Consider we have a folder C:\Work\
with two files:
My Epic Poem.docx
Secret Scetch.jpg
Running FileNamesShortener.exe -path 'C:\Work' -prefix-length 4
will turn them into:
My E.docx
Secr.jpg