Ideally what I am seeking is a way to rename all my anime keeping original files intact without using extra data space

The solution I can think of is creating a duplicate folder path to another location and then symlinking each file into the new duplicated folder path for renaming for media scraper to identify them

My question is how to create a symlink of every file in a folder to a new location.

Using FreeBSD 9, the following did not work for me :

cd ../bar
cp --symbolic-link ../foo/* .

Doing individually ( however that was with file rename which is not needed for now )

ln -s "/ZFSRaidz/Multimedia/Anime/Naruto_Shippuuden/[HorribleSubs] Naruto Shippuuden - 244 [480p].mkv" "/ZFSRaidz/XBMC/Multimedia/Anime/Naruto_Shippuuden/Naruto Shippuuden-244.mkv"
  • Why per file and not at the folder level? – user3463 May 28 '12 at 0:48

If you don't need to do a rename, then the following will symlink every file in a folder to a new folder:

ln -s /ZFSRaidz/Multimedia/Anime/Naruto_Shippuuden/* /ZFSRaidz/XBMC/Multimedia/Anime/Naruto_Shippuuden-2/

This will create a symlink in the Naruto_Shippuuden-2 for each file in Naruto_Shippuuden

| improve this answer | |
  • Thank you very much I had tried ln -s /ZFSRaidz/Multimedia/Anime/Naruto_Shippuuden/* /ZFSRaidz/XBMC/Multimedia/Anime/Naruto_Shippuuden/* – MasterCATZ May 28 '12 at 14:19
  • I removed that * and it worked. The reason for not doing the folder is the whole reason being I needed to rename the files from absolute numbering, e.g. 244 to s12e2 with out effecting my archiving. – MasterCATZ May 28 '12 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.