L
L
Lazy_EagleOwl2020-10-27 15:02:17
JavaScript
Lazy_EagleOwl, 2020-10-27 15:02:17

How to select only a specific file from a directory in gulp?

The directory contains images in jpg format with random names. I need to use gulp to rename them with numbers (1.jpg, 2.jpg, etc.) in the order of location in the folder, that is, first take those that are located above and go down to the bottom. How can I do that?
At first I tried somehow to take only the first file in the pack - it did not work out. Then I tried to work with gulp.src () as with an array - also zero. So it didn't come to anything.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question