Renaming files using node.js

前端 未结 4 1271
你的背包
你的背包 2020-12-02 14:14

I am quite new in using JS, so I will try to be as specific as I can :)

  • I have a folder with 260 .png files with different country names: Afghanistan.

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 14:49

    For synchronous renaming use fs.renameSync

    fs.renameSync('/path/to/Afghanistan.png', '/path/to/AF.png');
    

提交回复
热议问题