How to Modify Files with Node JS fs Module

preview_player
Показать описание
This video is a quick demo of how I used the Node JS' file system (fs) module to modify some images for a web development project.

Resources:
------------------

Рекомендации по теме
Комментарии
Автор

Ian, there might have been some images where every filename for the image had some form of DDDxDDD in the name. For example assume an original file has the name myYard_300x300.jpg. Now assume all the copies created from that original have DDxDD or DDDxDDD or DDDDxDDDD in their names. Your delete script will remove the original along with all the copies. A robust and somewhat more complicated script would need to use string compare to group the files according to identical characters at the beginning of each name. Then have some manner of logic to remove all but one of the files in the group.

RhettOlschner
welcome to shbcf.ru