📜 ⬆️ ⬇️

Script to copy files

There was a simple task: to sort through the files in a folder, check the name by a regular expression and upload the files to some other place, numbering them in order.

Example of use:
./main.py --search = "(. *?) \. (jpg | jpeg | png | gif | bmp | eps | tif | psd) $" --local = "D: \ images" --remote = "\\ SERVER \ Public"

If the D: \ images folder contains some images, then the script will transfer them to \\ SERVER \ Public and number the extension, for example, like this: 1.gif, 2.psd, 3.psd, 4.tif, ...
')
And this is done because
* reluctance to put cygwin on Windows.
* hunting to learn python

You can view the script help by calling with the -h or --help key:
./main.py --help

The script on the python slil.ru/29171194

Source: https://habr.com/ru/post/94099/


All Articles