<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" style="task" id="files-rename-multiple" lang="zh-CN">

  <info>
    <link type="guide" xref="files#common-file-tasks"/>
    <link type="seealso" xref="files-rename"/>
    <link type="seealso" xref="files-rename-music-metadata"/>

    <revision version="gnome:47" date="2024-08-31" status="candidate"/>

    <credit type="author">
      <name>Michael Hill</name>
      <email>mdhillca@gmail.com</email>
    </credit>

    <license xmlns="http://projectmallard.org/1.0/" href="https://creativecommons.org/licenses/by-sa/3.0/">
  <p>This work is licensed under a <link href="https://creativecommons.org/licenses/by-sa/3.0/">Creative
  Commons Attribution-ShareAlike 3.0 Unported License</link>.</p>
</license>

    <desc>Rename more than one file at once.</desc>
  <credit type="translator copyright"><name>TeliuTe</name><email>teliute@163.com</email><years>2011, 2012</years></credit><credit type="translator copyright"><name>tuberry</name><email>orzun@foxmail.com</email><years>2021</years></credit><credit type="translator copyright"><name>Victor_Trista</name><email>ljlzjzm@hotmail.com</email><years>2023</years></credit></info>

  <title>Rename multiple files</title>

  <p><app>Files</app> can be used to change the names of a group of files. You
  can <gui>Rename using a template</gui> or <gui>Find and replace text</gui>.</p>

  <steps>
    <title>To rename using a template:</title>
    <item><p>Select two or more files in <app>Files</app>.</p></item>
    <item><p>Press <key>F2</key> or right-click on the selection and pick
    <gui>Rename</gui>. The <gui>Rename</gui> window opens.</p></item>
    <item><p>Make sure <gui>Rename using a template</gui> is selected.</p>
      <note>
        <p>The name field contains "[Original filename]" as a placeholder. It
        can be deleted or added back from the <gui>+ Add</gui> menu.</p>
      </note>
    <p>Click before or after "[Original filename]" to add letters, words,
    or numbers to create the pattern you want.</p>
      <note style="warning">
        <p>Certain <link xref="files-rename#valid-chars">characters</link>
        should be avoided on some devices.</p>
      </note>
    <p>To number the files sequentially, click <gui>+ Add</gui> to choose
    the number of digits in the number you want added automatically. If you are
    renaming 10 or more files but fewer than 100, choose two digits (<gui>01,
    02, 03, 04</gui>). Choose three (<gui>001, 002, 003, 004</gui>) if you have
    more than 99 files to rename.</p>
    <p>The preview list will show the current filenames on the left and the
    resulting filenames on the right.</p></item>
    <item><p>Click the <gui>Rename</gui> button to apply the pattern you have
    created, and the files will be renamed.</p></item>
  </steps>
  
  <p>当您重命名文件时，只会选取文件名称的第一部分，而不包括文件扩展名（最后一个 <file>.</file> 后的部分）。扩展名通常表示文件的类型（例如，<file>file.pdf</file> 是一个PDF文档），通常不需要改变。如果一定要更改扩展名，可以选取整个文件名后更改。</p>
  
  <steps>
    <title>To rename using find and replace text:</title>
    <item><p>Select two or more files in <app>Files</app>.</p></item>
    <item><p>Press <key>F2</key> or right-click on the selection and pick
    <gui>Rename</gui>.</p></item>
    <item><p>Select <gui>Find and replace text</gui>.</p></item>
    <item><p>For <gui>Existing Text</gui> type the text to be replaced. For
    <gui>Replace With</gui>, type the new text. The preview list will show the
    current filenames on the left and the resulting filenames on the
    right.</p></item>
    <item><p>Click the <gui>Rename</gui> button to accept the replacement in the
    preview, and the files will be renamed.</p></item>
  </steps>

  <note style="tip">
    <p>如果重命名错误，或不合适，您可以撤销重命名。要撤销操作，立即点击侧边中的菜单按钮，选择<gui>撤销重命名</gui>，或按 <keyseq><key>Ctrl</key><key>Z</key></keyseq>，即可恢复其之前的名称。</p>
  </note>

</page>
