Use a for loop to go through the filenames in the directory. In this version, only loop through the filenames that do not have a ".old" extension
Inside the loop, rename the file to the new name.
any idea how to do this please?
feedback
|
|
You need to replace what's between
| |||
|
feedback
|
|
As this isn't a homework question, and you just want to know the best way to do this, here is a way to do it with find:
This will get all files that don't have the suffix 'old' and rename them with the prefix newname_ No for loop required. | |||
|
feedback
|