0

I am using Mac OS High Sierra.

Files are stored in 5 child folders inside a parent folder with name 'All files'.

I have stored the list of files in a separate file called 'listOfFiles.json', in array format,i.e.,

["File1.JPEG", "File2.JPEG",.....]

Now, I wanted to devise a script that I will be running at directory "All files" to find and copy all matched files to a new directory.

  • 1
    Have you considered writing your script in Python? It is available on every macOS installation, has libraries for reading JSON and libraries for copying files. Assembling this into a script shouldn't be more than 20 lines of code. In a shell script you will need to deal with intricacies of JSON, escaped characters, spaces in filenames, ... - might be much more of a hassle. – Christoph Sommer Apr 3 at 0:08

Your Answer

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

Browse other questions tagged or ask your own question.