Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I am in the proper directory when running these commands. When running the first block line by line the last line starting with mv throws the operation not permitted command. That said, I do get a file-for-ffmpeg at the Finder window. When I manually add .txt to the end of it I can open and see the document contains the text file 'file*mp4' Commented Oct 13, 2021 at 16:18
  • Using cp instead of mv prevents the error from being thrown but the txt file still just reads file 'file*mp4' Commented Oct 13, 2021 at 18:09
  • When I run cd /directory/with/videofiles rm -f /tmp/t for f in file *.MP4; do echo "file '$f'" >> /tmp/t done cp /tmp/t ./file-for-ffmpeg.txt I do get a .txt file with my list of files but the first line of the txt file reads file 'file' How would I get rid of that? Commented Oct 13, 2021 at 18:17
  • When I run cd /directory/with/videofiles rm -f /tmp/t for f in file*.MP4; do echo "file '$f'" >> /tmp/t done cp /tmp/t ./file-for-ffmpeg.txt I get a .txt file whose only content reads file 'file*.MP4' Commented Oct 13, 2021 at 19:35
  • If the files have lowercase extensions (i.e. .mp4, not .MP4), then you need to use lowercase in the pattern: for f in file*.mp4. If there's a mix of upper- and lower-case extensions, then use for f in file*.[mM][pP]4 to match both. Commented Oct 15, 2021 at 9:17