Skip to main content
8 events
when toggle format what by license comment
Sep 12, 2021 at 17:08 comment added cas You can do this with rename, using perl's open() function to open the files.txt file for read, then iterate over lines in the file and split each line on white-space....but for a job like this, it's probably easier to just write a perl script without using the perl rename tool. or a bash script as in my answer below.
Sep 12, 2021 at 17:05 answer added cas timeline score: 0
Sep 12, 2021 at 13:43 comment added soosa I have used rename utility. But I am unable to use it via text file. I have used multiple options to rename the file using the extensions, specific pattern in the file name, replacing specific characters, finding the names in subdirectories and moving them but none of these condition apply to my query. (using a text file with an old name and new name in the file)
Sep 12, 2021 at 13:30 comment added cas Use the perl rename utility. There are many questions with detailed answers on how to use it here on this site. It can handle any kind of renaming task, from simple sed-like filename transformations (s/old/new/) to a a complex script using any valid perl code.
Sep 12, 2021 at 13:25 history edited soosa CC BY-SA 4.0
added 400 characters in body
Sep 12, 2021 at 13:13 comment added Arnaud Valmary xargs command work only on file lines. So mv is only called on those values. Do you put in your question an example of file names and directories/sub-directories structure and of course an example of what do you expect. Thanks
S Sep 12, 2021 at 12:32 review First questions
Sep 12, 2021 at 17:58
S Sep 12, 2021 at 12:32 history asked soosa CC BY-SA 4.0