Timeline for Create directory using filenames and move the files to its respective folder
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 4, 2022 at 14:03 | vote | accept | Maxfield | ||
| Aug 4, 2022 at 14:03 | comment | added | Maxfield | Ok You bash script works great. when it was run as bash instead of copying the lines one by one. Thank you. Any ideal ? yes I was also doing the "set -o errexit -o nounset" command, not sure if there is the problem. | |
| Aug 4, 2022 at 13:45 | comment | added | Chris Davies | @johnsmith I see your edit. My code does exactly what you ask for the example filenames you provide (item.txt and item(1).txt, etc.). Therefore, if it's not working for you, you need to give examples of the file names that work and those that do not. | |
| Aug 4, 2022 at 12:38 | history | edited | Chris Davies | CC BY-SA 4.0 | Add #! |
| Aug 4, 2022 at 12:33 | comment | added | Chris Davies | @johnsmith please update your question to make that clear. You have currently written "For each two similar copy, create one folders and move both similar file into the folder.", and that is what this code does. | |
| Aug 4, 2022 at 12:29 | comment | added | Maxfield | This doesn't work, which just create the same result of having each folder for each file. but we would like to create one folder for each similar copy files. one folder for 001.txt and 001(1).txt where 001.txt and 001(1). txt have different content. | |
| Aug 4, 2022 at 12:03 | history | answered | Chris Davies | CC BY-SA 4.0 |