将文件路径从长格式转换为短格式 [英] Convert filepaths from long to short format

查看:352
本文介绍了将文件路径从长格式转换为短格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a folder of many .M3U files each containing a list of file references, e.g.

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

如何将它们转换为短文件名格式?

How can I convert these to short filename format?

推荐答案

@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 - 如果列表中提到的文件存在。

Each existing playlist will be converted to samenameshort.mp3 - provided the file mentioned in the list exists.

这篇关于将文件路径从长格式转换为短格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆