Skip to content

Instantly share code, notes, and snippets.

@skuro
Created November 6, 2011 11:23
Show Gist options
  • Select an option

  • Save skuro/1342765 to your computer and use it in GitHub Desktop.

Select an option

Save skuro/1342765 to your computer and use it in GitHub Desktop.
rename-files.clj
(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