Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.27 KB | None | 0 0
  1. def tags = new File("path/to/tags/file.txt").text.split("\n")
  2. new File("path/to/image/folder").eachFile{ f ->
  3.     def tag = tags[f.name.replaceAll(/\.[.]+$/)]
  4.     if (tag ==~ /(?i).*(nsfw|sketchy).*).moveTo("nsfw/")
  5.     else if (tag ==~ /(?i).*sfw.*/) f.moveTo("sfw/")
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement