使用列中的信息重命名多个 csv 文件名
有许多老师在csv列中填写了他们的信息,但是,这些csv文件被标记为不规则的名称(例如,1.csv、apple school.csv、003.csv等)。
这些文件包含相同的列(id、分数、年级、班级、学校、城市)
我想用常规方式重命名 csv 文件,并一次性使用它们在列中填写的内容, 例如“1A_S_L.csv” 那么我就认出这个文件是来自L市S学校1A的老师
非常感谢您的帮助。
There are many teachers filled their information in the csv columns, however, these csv files were labelled with a irregular name (e.g., 1.csv, apple school.csv, 003.csv, etc.).
These files contain the same columns (id, score, grade,class, school, city)
I'd like to rename the csv files in a regular way with what they filled in the columns in one go, such as "1A_S_L.csv"
then I can recognize this file is from the teacher of 1A, S school, L city
Many thanks for your assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将输入文件放入名为
in
的文件夹中,创建一个名为out
的空文件夹。然后类似这样的事情将循环
in
中的文件,并将它们复制到out
中的文件,其名称基于grade
、class
、学校
和城市
:Place your input files in a folder named
in
, create an empty folder namedout
.Then something like this will loop over the files in
in
, and copy them to files inout
with names based ongrade
,class
,school
andcity
: