Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 2
    cd into your folder and: for file in *.txt; do mkdir -- "${file%.txt}"; mv -- "$file" "${file%.txt}"; done Commented Jun 27, 2014 at 12:01
  • mkdir: cannot create directory ‘GmZzz3StdPk.txt’: File exists Commented Jun 27, 2014 at 12:05
  • Are you sure you copied the line I gave (especially the "${file%.txt}"? What is your shell? Commented Jun 27, 2014 at 12:08
  • @gniourf_gniourf: Yes, I copied the same thing and tried. My shell is bash Commented Jun 27, 2014 at 12:14
  • 1
    Do you have a file named GmZzz3StdPk.txt.txt? Commented Jun 27, 2014 at 12:18