This example is from https://stackoverflow.com/questions/20874915/rename-multiple-files-in-a-folder-add-a-prefix-windows. The request is how to prefix a folder's name to all of the files in it, for example the files in C:\house chores\ will all be renamed house chores - $old_name. Although not stated in the question, from "C:\" Windows is obvious. Discussion makes it clear that the intent is not to automatically add whatever the folder name is, making this a simple partial rename addressed by: rene * "house chores - "*
This is uninteresting in itself but the subsequent discussion talks about how to avoid adding the prefix to those files that already have it. This does not seem like a realistic situation but rene's filter option can handle it anyway. rene * "house chores - "* -F/"house chores - "*/
Among other things, the filter option -F serves as a prefilter for rene's native and regular expression modes, which include their own acceptance filter. A rejecting prefilter often simplifies (or makes possible, as in this case) an acceptance filter. -F allows an unlimited number of exclusion patterns. Typically, these are not for a fixed string but for a class. For example -F/rene/.py/ would exclude any file that begins with rene and any whose extension is py. The recurse option -R has a similar mechanism for excluding directories.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This example is from https://stackoverflow.com/questions/20874915/rename-multiple-files-in-a-folder-add-a-prefix-windows. The request is how to prefix a folder's name to all of the files in it, for example the files in C:\house chores\ will all be renamed house chores - $old_name. Although not stated in the question, from "C:\" Windows is obvious. Discussion makes it clear that the intent is not to automatically add whatever the folder name is, making this a simple partial rename addressed by:
rene * "house chores - "*
This is uninteresting in itself but the subsequent discussion talks about how to avoid adding the prefix to those files that already have it. This does not seem like a realistic situation but rene's filter option can handle it anyway.
rene * "house chores - "* -F/"house chores - "*/
Among other things, the filter option -F serves as a prefilter for rene's native and regular expression modes, which include their own acceptance filter. A rejecting prefilter often simplifies (or makes possible, as in this case) an acceptance filter. -F allows an unlimited number of exclusion patterns. Typically, these are not for a fixed string but for a class. For example -F/rene/.py/ would exclude any file that begins with rene and any whose extension is py. The recurse option -R has a similar mechanism for excluding directories.