Created
November 6, 2011 11:23
-
-
Save skuro/1342765 to your computer and use it in GitHub Desktop.
rename-files.clj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn rename-file [prefix file counter] | |
| (.renameTo file (str prefix "-" counter) | |
| (println (.getPath file)) | |
| (defn rename [dirpath prefix] | |
| (map (partial rename-file prefix) (-> dirpath File. file-seq) (range))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment