{
  "id": 397127,
  "title": "Filename handling",
  "url": "/competitions/tlvmc-parkinsons-freezing-gait-prediction/discussion/397127",
  "author_name": "Calvin Cheung",
  "post_date": "2023-03-24T07:31:24.570000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I believe one of the biggest problem is the random filename convention. We can do sth like rename to make them naming by sequence number.</p>\n<p><a href=\"https://askubuntu.com/questions/301781/how-to-rename-multiple-files-sequentially-from-command-line\" target=\"_blank\">https://askubuntu.com/questions/301781/how-to-rename-multiple-files-sequentially-from-command-line</a></p>\n<p><a href=\"https://linuxconfig.org/how-to-rename-multiple-files-on-linux\" target=\"_blank\">https://linuxconfig.org/how-to-rename-multiple-files-on-linux</a></p>\n<p>below is an example for linux</p>\n<p>touch a.txt<br>\ntouch b.txt<br>\ntouch c.txt<br>\ntouch d.txt</p>\n<p>N=10001<br>\nfor X in *.txt; do<br>\n    mv $X a$N.txt<br>\n    N=$(($N+1))<br>\ndone</p>\n<p>N=1<br>\nfor X in a1*.txt; do<br>\n    mv a1000$N.txt a000$N.txt<br>\n    N=$(($N+1))<br>\ndone</p>",
  "messages": [
    {
      "id": 2194838,
      "postDate": "2023-03-24T07:31:24.570Z",
      "content": "<p>I believe one of the biggest problem is the random filename convention. We can do sth like rename to make them naming by sequence number.</p>\n<p><a href=\"https://askubuntu.com/questions/301781/how-to-rename-multiple-files-sequentially-from-command-line\" target=\"_blank\">https://askubuntu.com/questions/301781/how-to-rename-multiple-files-sequentially-from-command-line</a></p>\n<p><a href=\"https://linuxconfig.org/how-to-rename-multiple-files-on-linux\" target=\"_blank\">https://linuxconfig.org/how-to-rename-multiple-files-on-linux</a></p>\n<p>below is an example for linux</p>\n<p>touch a.txt<br>\ntouch b.txt<br>\ntouch c.txt<br>\ntouch d.txt</p>\n<p>N=10001<br>\nfor X in *.txt; do<br>\n    mv $X a$N.txt<br>\n    N=$(($N+1))<br>\ndone</p>\n<p>N=1<br>\nfor X in a1*.txt; do<br>\n    mv a1000$N.txt a000$N.txt<br>\n    N=$(($N+1))<br>\ndone</p>",
      "rawMarkdown": "I believe one of the biggest problem is the random filename convention. We can do sth like rename to make them naming by sequence number.\n\nhttps://askubuntu.com/questions/301781/how-to-rename-multiple-files-sequentially-from-command-line\n\nhttps://linuxconfig.org/how-to-rename-multiple-files-on-linux\n\nbelow is an example for linux\n\ntouch a.txt\ntouch b.txt\ntouch c.txt\ntouch d.txt\n\nN=10001\nfor X in *.txt; do\n\tmv $X a$N.txt\n\tN=$(($N+1))\ndone\n\nN=1\nfor X in a1*.txt; do\n\tmv a1000$N.txt a000$N.txt\n\tN=$(($N+1))\ndone\n\n",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2194838": "I believe one of the biggest problem is the random filename convention. We can do sth like rename to make them naming by sequence number.\n\nhttps://askubuntu.com/questions/301781/how-to-rename-multiple-files-sequentially-from-command-line\n\nhttps://linuxconfig.org/how-to-rename-multiple-files-on-linux\n\nbelow is an example for linux\n\ntouch a.txt\ntouch b.txt\ntouch c.txt\ntouch d.txt\n\nN=10001\nfor X in *.txt; do\n\tmv $X a$N.txt\n\tN=$(($N+1))\ndone\n\nN=1\nfor X in a1*.txt; do\n\tmv a1000$N.txt a000$N.txt\n\tN=$(($N+1))\ndone\n\n"
  }
}