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*

6
  • this keeps the full file name intead of desiredname.m :) no ? -- & test the directory is present is mush better than removing error messages by redirection to /dev/null :) Commented Feb 6, 2018 at 19:57
  • @francoisP I'm eagerly awaiting your solution. The OP did not request to alter the filenames. I hope the downvote had a valid excuse. Commented Feb 6, 2018 at 20:15
  • 1
    I didn’t vote, but see Why is looping over find’s output bad practice? Also, we prefer answers with explanations. Commented Feb 6, 2018 at 21:04
  • Yeah, my bad for not being clear. Thanks anyway for the help! Commented Feb 6, 2018 at 22:13
  • I down-voted because like G-Man said this is bad practice. Also you have not quoted some variables. Commented Feb 6, 2018 at 22:26