将文件路径从长格式转换为短格式

我有一个包含许多.M3U文件的文件夹,每个文件都包含一个文件引用列表,例如

\Dance\00724347388620-1-1.flac
\Dance\00724347388620-1-11.flac
\Dance\00724347388620-1-15.flac
\Spacers\02480002928928-1-44.flac

如何将这些转换为短文件名格式?

采纳答案:
@ECHO OFF
SETLOCAL
FOR /f "delims=" %%m IN ('dir /b *.m3u') DO (
 FOR /f "usebackqdelims=" %%a IN ("%%m") DO ECHO %%~sa
)>%%~nmshort.m3u


GOTO :EOF

每个现有播放列表都将转换为samenameshort.mp3 - 前提是列表中提到的文件存在。

author: magoo

参考更多解答: Convert filepaths from long to short format ,转载请保留出处将文件路径从长格式转换为短格式及作者信息

Statement: We respect knowledge and authors. Since the content comes from the Internet and is intended for scientific research, any reprinters should retain the author's signature and origin. If you are the author of the content and feel in dispute, please contact email: 1076545519@qq.com. We will find out the situation and deal with it in time. We sincerely thank the author for his hard work.


更多:cmd