I have a directory of product images that I'd like to rename to the products's UPC. I have the file name mapping in a spreadsheet, so I can export it to CSV or tab delimited.
Given filenames.txt:
CurrentName NewName
DSCN4033.png 750732000259.png
DSCN4023.png 750732000013.png
DSCN4024.png 750732000020.png
DSCN4022.png 750732000099.png
DSCN4033.png would become 750732000259.png
If I were doing this with Bash, the command would be
while read old new; do mv "$old" "$new"; done < filenames.txt
This is for a project at work that must be done with a Windows batch file so that my successors don't have to mess with Cygwin.
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 165
تاريخ: دوشنبه
3 خرداد
1395 ساعت: 7:16