Renaming files using node.js

前端 未结 4 1275
你的背包
你的背包 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:41

    1. fs.readdir(path, callback)
    2. fs.rename(old,new,callback)

    Go through http://nodejs.org/api/fs.html

    One important thing - you can use sync functions also. (It will work like C program)

提交回复
热议问题