Here’s something I can’t figure out: When using dired to manage files, let’s say I have a top level directory with a ton of subdirectories, each with a GoPro video inside (unique name/time/date for each file name). How do I move them all at once to that top level directory for easier management/renaming? I don’t want to have to go into each directory and move them one at a time with R. Let’s say all of the files are MP4 or HEVC.

  • Aminumbra@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    For an elisp solution (not dired, still in Emacs):

                 (rename-file filename ))
               (directory-files-recursively  "."))
    
    

    You can filter via the second argument of directory-files-recursively which files you want to list (using a regexp), or use any test you want in the lambda.

    Not the fastest if you have a large amount of files, as it is pure elisp.