![]() |
Script for a list? - Printable Version +- ASK NC (https://ask.nascompares.com) +-- Forum: Q&A (https://ask.nascompares.com/forumdisplay.php?fid=1) +--- Forum: Before you buy Q&A (https://ask.nascompares.com/forumdisplay.php?fid=2) +--- Thread: Script for a list? (/showthread.php?tid=12226) |
Script for a list? - Enquiries - 08-06-2025 Hello Gentleman - I'm hoping you can help since I can't find an answer to this anywhere in Synology or on the web from what I can see. I'm in the process of considating my medical files movies, tv shows etc. from iTunes and other sources into synology. Is there any script I can run that will give me just a simple list of names/titlas of the files I have in a folder so that I can ultimately take that list and enter it into a look up table so I can compare what I have and have moved? I hope this is clear with what I'masking here but I haven't been able to find a thing to be able to get this out of my 920+ but it seems like something that should be easy to do? Thank you for the time on this! Rob RE: Script for a list? - ed - 08-07-2025 Thanks for your message — and yes, what you’re after is totally doable with a quick script. If you’re looking to generate a simple list of filenames (just titles, not metadata) from a specific folder on your Synology NAS, here’s a straightforward way to do it using SSH. Step-by-Step: Generate File List from a Folder 1. Enable SSH on your Synology NAS Go to Control Panel > Terminal & SNMP, enable SSH, and click Apply. 2. Connect via SSH From a terminal on your Mac or PC: ssh adminusername@NAS_IP_ADDRESS (Replace adminusername and NAS_IP_ADDRESS with your own values.) 3. Navigate to the folder where your files are stored For example: cd /volume1/video/movies 4. Run the following command to list all filenames This will output all files (and folders) in that directory and save them into a text file: ls -1 > filelist.txt Or for recursive listing of all files in subfolders: find . -type f > full_file_list.txt 5. Retrieve the list You can use File Station or SCP to grab the filelist.txt or full_file_list.txt file back to your computer for use in Excel, lookup tables, or other applications. |