Score:0

Automate files with no extension to .txt

bw flag

I need to convert specific files named GYART01 GYART02 GYART03 GYART04 GYART05 etc to GYART01.txt GYART02.txt GYART03.txt GYART04.txt GYART05.txt.

There are other files in all directories that also do not have extensions. So I want to specifically convert all these GYART files to .txt files.

How do I go about this? Any help would be greatly appreciated.

24601 avatar
in flag
didn't [your earlier question](https://askubuntu.com/questions/1350303/how-to-automate-a-job-to-move-the-latest-file-with-a-sequential-file-name) provide the answers you needed?
vanadium avatar
cn flag
Can´t you use wildcards to target only the GYART files?
24601 avatar
in flag
Does this answer your question? [How to Automate a job to move the latest file with a sequential file name](https://askubuntu.com/questions/1350303/how-to-automate-a-job-to-move-the-latest-file-with-a-sequential-file-name)
Score:5
cn flag

Go to the directory:

cd <path>

Rename files:

find . -type f -name 'GYART*' -exec mv '{}' '{}'.txt \;
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.