Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def tags = new File("path/to/tags/file.txt").text.split("\n")
- new File("path/to/image/folder").eachFile{ f ->
- def tag = tags[f.name.replaceAll(/\.[.]+$/)]
- if (tag ==~ /(?i).*(nsfw|sketchy).*).moveTo("nsfw/")
- else if (tag ==~ /(?i).*sfw.*/) f.moveTo("sfw/")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement