Install Ubuntu 18.04 alongside two Windows 10

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












My computer setup is:



  • 1- SSD 120GB

  • 1- HDD 320GB

  • 1- HDD 1TB

I have two partitions on SSD of Windows 10 (one for work, another for games/testing/whatever) and I want to install Ubuntu on my 320GB HDD.
However, Ubuntu installer doesn't recognize Windows.



I tried to select "More options" to make the partitions on my own but when installer start said "errno 5 input/output"
I redownloaded ISO, tried other pendrives and every USB connection of my PC but always the same error.



Is there anything I can do?




EDIT:



I managed to install Ubuntu on my 320GB hard drive but now GRUB is not detecting Windows10 partitions.



I tried to use Boot-repair but despite "successfully boot repaired", only Ubuntu appears in GRUB.



Here is a pastebin of Boot-repair log: http://paste.ubuntu.com/p/5KbYMRxqg9/



  • /sda (windows system partitions)

    • /sda1 Windows 10 Work partition

    • /sda2 Windows 10 Fun partition

    • /sda3 Windows Reserved Partition


  • /sdb (Storage)

  • /sdc (Ubuntu)

    • /sdc1 Ubuntu 18.04

    • /sdc2 /Boot (partition recommended by Boot-repair)


Any ideas?







share|improve this question






















  • Are you sure you are installing Ubuntu in the same mode (UEFI vx. legacy) as Windows?
    – ubfan1
    May 15 at 20:12






  • 1




    You need to make sure Windows 10's fast start up is off. askubuntu.com/questions/843153/… You probably need that off, just to have both Windows work. Post these: sudo fdisk -lu and sudo gdisk -l /dev/sda and then for sdb & sdc.
    – oldfred
    May 15 at 20:33















up vote
0
down vote

favorite












My computer setup is:



  • 1- SSD 120GB

  • 1- HDD 320GB

  • 1- HDD 1TB

I have two partitions on SSD of Windows 10 (one for work, another for games/testing/whatever) and I want to install Ubuntu on my 320GB HDD.
However, Ubuntu installer doesn't recognize Windows.



I tried to select "More options" to make the partitions on my own but when installer start said "errno 5 input/output"
I redownloaded ISO, tried other pendrives and every USB connection of my PC but always the same error.



Is there anything I can do?




EDIT:



I managed to install Ubuntu on my 320GB hard drive but now GRUB is not detecting Windows10 partitions.



I tried to use Boot-repair but despite "successfully boot repaired", only Ubuntu appears in GRUB.



Here is a pastebin of Boot-repair log: http://paste.ubuntu.com/p/5KbYMRxqg9/



  • /sda (windows system partitions)

    • /sda1 Windows 10 Work partition

    • /sda2 Windows 10 Fun partition

    • /sda3 Windows Reserved Partition


  • /sdb (Storage)

  • /sdc (Ubuntu)

    • /sdc1 Ubuntu 18.04

    • /sdc2 /Boot (partition recommended by Boot-repair)


Any ideas?







share|improve this question






















  • Are you sure you are installing Ubuntu in the same mode (UEFI vx. legacy) as Windows?
    – ubfan1
    May 15 at 20:12






  • 1




    You need to make sure Windows 10's fast start up is off. askubuntu.com/questions/843153/… You probably need that off, just to have both Windows work. Post these: sudo fdisk -lu and sudo gdisk -l /dev/sda and then for sdb & sdc.
    – oldfred
    May 15 at 20:33













up vote
0
down vote

favorite









up vote
0
down vote

favorite











My computer setup is:



  • 1- SSD 120GB

  • 1- HDD 320GB

  • 1- HDD 1TB

I have two partitions on SSD of Windows 10 (one for work, another for games/testing/whatever) and I want to install Ubuntu on my 320GB HDD.
However, Ubuntu installer doesn't recognize Windows.



I tried to select "More options" to make the partitions on my own but when installer start said "errno 5 input/output"
I redownloaded ISO, tried other pendrives and every USB connection of my PC but always the same error.



Is there anything I can do?




EDIT:



I managed to install Ubuntu on my 320GB hard drive but now GRUB is not detecting Windows10 partitions.



I tried to use Boot-repair but despite "successfully boot repaired", only Ubuntu appears in GRUB.



Here is a pastebin of Boot-repair log: http://paste.ubuntu.com/p/5KbYMRxqg9/



  • /sda (windows system partitions)

    • /sda1 Windows 10 Work partition

    • /sda2 Windows 10 Fun partition

    • /sda3 Windows Reserved Partition


  • /sdb (Storage)

  • /sdc (Ubuntu)

    • /sdc1 Ubuntu 18.04

    • /sdc2 /Boot (partition recommended by Boot-repair)


Any ideas?







share|improve this question














My computer setup is:



  • 1- SSD 120GB

  • 1- HDD 320GB

  • 1- HDD 1TB

I have two partitions on SSD of Windows 10 (one for work, another for games/testing/whatever) and I want to install Ubuntu on my 320GB HDD.
However, Ubuntu installer doesn't recognize Windows.



I tried to select "More options" to make the partitions on my own but when installer start said "errno 5 input/output"
I redownloaded ISO, tried other pendrives and every USB connection of my PC but always the same error.



Is there anything I can do?




EDIT:



I managed to install Ubuntu on my 320GB hard drive but now GRUB is not detecting Windows10 partitions.



I tried to use Boot-repair but despite "successfully boot repaired", only Ubuntu appears in GRUB.



Here is a pastebin of Boot-repair log: http://paste.ubuntu.com/p/5KbYMRxqg9/



  • /sda (windows system partitions)

    • /sda1 Windows 10 Work partition

    • /sda2 Windows 10 Fun partition

    • /sda3 Windows Reserved Partition


  • /sdb (Storage)

  • /sdc (Ubuntu)

    • /sdc1 Ubuntu 18.04

    • /sdc2 /Boot (partition recommended by Boot-repair)


Any ideas?









share|improve this question













share|improve this question




share|improve this question








edited May 16 at 11:49









Melebius

3,66041636




3,66041636










asked May 15 at 19:06









Sher852

11




11











  • Are you sure you are installing Ubuntu in the same mode (UEFI vx. legacy) as Windows?
    – ubfan1
    May 15 at 20:12






  • 1




    You need to make sure Windows 10's fast start up is off. askubuntu.com/questions/843153/… You probably need that off, just to have both Windows work. Post these: sudo fdisk -lu and sudo gdisk -l /dev/sda and then for sdb & sdc.
    – oldfred
    May 15 at 20:33

















  • Are you sure you are installing Ubuntu in the same mode (UEFI vx. legacy) as Windows?
    – ubfan1
    May 15 at 20:12






  • 1




    You need to make sure Windows 10's fast start up is off. askubuntu.com/questions/843153/… You probably need that off, just to have both Windows work. Post these: sudo fdisk -lu and sudo gdisk -l /dev/sda and then for sdb & sdc.
    – oldfred
    May 15 at 20:33
















Are you sure you are installing Ubuntu in the same mode (UEFI vx. legacy) as Windows?
– ubfan1
May 15 at 20:12




Are you sure you are installing Ubuntu in the same mode (UEFI vx. legacy) as Windows?
– ubfan1
May 15 at 20:12




1




1




You need to make sure Windows 10's fast start up is off. askubuntu.com/questions/843153/… You probably need that off, just to have both Windows work. Post these: sudo fdisk -lu and sudo gdisk -l /dev/sda and then for sdb & sdc.
– oldfred
May 15 at 20:33





You need to make sure Windows 10's fast start up is off. askubuntu.com/questions/843153/… You probably need that off, just to have both Windows work. Post these: sudo fdisk -lu and sudo gdisk -l /dev/sda and then for sdb & sdc.
– oldfred
May 15 at 20:33











3 Answers
3






active

oldest

votes

















up vote
2
down vote













With multiple drives and BIOS boot, best to only run Boot-Repair's advanced mode. Then you can choose to only install grub2's boot loader to the MBR of the Linux drive.
You ran the auto fix which installed grub to the MBR of all drives. You will want the Windows boot loader in sda & grub in sdc. Boot loader in sdb does not matter.



Windows normally installs a separate Boot partition with bootmgr & BCD. Windows users do not see it as it is not shown in Windows. It normally is a 100MB partition just before the main install, but you have the main install at beginning of drive, sda. So Boot partition must have been on the now Linux drive. You can have bootmgr & BCD in your main Windows install if you have the boot flag on the main install which you do have and fix Windows.



But you cannot fix your issues with Linux repair tools, you need a Windows repair flash drive or installer with repair console and run the full set of Windows repairs, to add bootmgr, BCD and Windows boot loader to MBR of sda.



This is a Linux forum, so if you need help on fixing Windows use



https://superuser.com/






share|improve this answer



























    up vote
    0
    down vote













    I had a similar issue back then when I was installing Ubuntu alonside Win7 & Win10, I made it through:



    1. Installing Ubuntu on a separate partition .

    2. After installation I found that grub won't read Windows Installations, tried sudo upgrade-grub but still no resolution.

    3. Found a utiltity named boot-repair and it did the work.





    share|improve this answer



























      up vote
      0
      down vote













      Thank you to @oldfred to guide me to the right path. I solved this way




      Solution:



      1. Download Windows 10 ISO from Microsoft Webpage

      2. Create a bootable USB using Unetbootin

      3. Boot Windows 10 USB and select "Repair" -> "Advanced Options" -> "Command Prompt"

      4. Insert the following commands to delete partitions including Ubuntu:

      Start diskpart utility




      diskpart




      Select the disk X where you want to install Windows Boot Manager and Ubuntu 18.04




      list disk



      select disk X




      Erase disk and partitions




      clean



      convert disk to gpt



      convert gpt




      Create partition efi 260mb and format as fat 32




      create partition efi size=260



      format quick fs=fat32




      Check that everything is correct




      list partition




      Note the volume letter where the Windows OS is installed.




      list volume




      Exit from diskpart utility




      exit




      Rebuild Windows Boot Manager




      bcdboot X:windows Note: Replace "X" with the volume letter of the Windows > OS partition.




      In my case, I had to use it twice. One for Work partition and another for Games partition.



      1. Install Ubuntu as normally do in the same disk as Windows Boot Manager.

      Now, when you start your computer Grub2 will ask you if you want to start Ubuntu or Windows Boot Manager.






      share|improve this answer




















      • Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
        – oldfred
        May 16 at 18:27










      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036667%2finstall-ubuntu-18-04-alongside-two-windows-10%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      With multiple drives and BIOS boot, best to only run Boot-Repair's advanced mode. Then you can choose to only install grub2's boot loader to the MBR of the Linux drive.
      You ran the auto fix which installed grub to the MBR of all drives. You will want the Windows boot loader in sda & grub in sdc. Boot loader in sdb does not matter.



      Windows normally installs a separate Boot partition with bootmgr & BCD. Windows users do not see it as it is not shown in Windows. It normally is a 100MB partition just before the main install, but you have the main install at beginning of drive, sda. So Boot partition must have been on the now Linux drive. You can have bootmgr & BCD in your main Windows install if you have the boot flag on the main install which you do have and fix Windows.



      But you cannot fix your issues with Linux repair tools, you need a Windows repair flash drive or installer with repair console and run the full set of Windows repairs, to add bootmgr, BCD and Windows boot loader to MBR of sda.



      This is a Linux forum, so if you need help on fixing Windows use



      https://superuser.com/






      share|improve this answer
























        up vote
        2
        down vote













        With multiple drives and BIOS boot, best to only run Boot-Repair's advanced mode. Then you can choose to only install grub2's boot loader to the MBR of the Linux drive.
        You ran the auto fix which installed grub to the MBR of all drives. You will want the Windows boot loader in sda & grub in sdc. Boot loader in sdb does not matter.



        Windows normally installs a separate Boot partition with bootmgr & BCD. Windows users do not see it as it is not shown in Windows. It normally is a 100MB partition just before the main install, but you have the main install at beginning of drive, sda. So Boot partition must have been on the now Linux drive. You can have bootmgr & BCD in your main Windows install if you have the boot flag on the main install which you do have and fix Windows.



        But you cannot fix your issues with Linux repair tools, you need a Windows repair flash drive or installer with repair console and run the full set of Windows repairs, to add bootmgr, BCD and Windows boot loader to MBR of sda.



        This is a Linux forum, so if you need help on fixing Windows use



        https://superuser.com/






        share|improve this answer






















          up vote
          2
          down vote










          up vote
          2
          down vote









          With multiple drives and BIOS boot, best to only run Boot-Repair's advanced mode. Then you can choose to only install grub2's boot loader to the MBR of the Linux drive.
          You ran the auto fix which installed grub to the MBR of all drives. You will want the Windows boot loader in sda & grub in sdc. Boot loader in sdb does not matter.



          Windows normally installs a separate Boot partition with bootmgr & BCD. Windows users do not see it as it is not shown in Windows. It normally is a 100MB partition just before the main install, but you have the main install at beginning of drive, sda. So Boot partition must have been on the now Linux drive. You can have bootmgr & BCD in your main Windows install if you have the boot flag on the main install which you do have and fix Windows.



          But you cannot fix your issues with Linux repair tools, you need a Windows repair flash drive or installer with repair console and run the full set of Windows repairs, to add bootmgr, BCD and Windows boot loader to MBR of sda.



          This is a Linux forum, so if you need help on fixing Windows use



          https://superuser.com/






          share|improve this answer












          With multiple drives and BIOS boot, best to only run Boot-Repair's advanced mode. Then you can choose to only install grub2's boot loader to the MBR of the Linux drive.
          You ran the auto fix which installed grub to the MBR of all drives. You will want the Windows boot loader in sda & grub in sdc. Boot loader in sdb does not matter.



          Windows normally installs a separate Boot partition with bootmgr & BCD. Windows users do not see it as it is not shown in Windows. It normally is a 100MB partition just before the main install, but you have the main install at beginning of drive, sda. So Boot partition must have been on the now Linux drive. You can have bootmgr & BCD in your main Windows install if you have the boot flag on the main install which you do have and fix Windows.



          But you cannot fix your issues with Linux repair tools, you need a Windows repair flash drive or installer with repair console and run the full set of Windows repairs, to add bootmgr, BCD and Windows boot loader to MBR of sda.



          This is a Linux forum, so if you need help on fixing Windows use



          https://superuser.com/







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 16 at 13:27









          oldfred

          7,12921218




          7,12921218






















              up vote
              0
              down vote













              I had a similar issue back then when I was installing Ubuntu alonside Win7 & Win10, I made it through:



              1. Installing Ubuntu on a separate partition .

              2. After installation I found that grub won't read Windows Installations, tried sudo upgrade-grub but still no resolution.

              3. Found a utiltity named boot-repair and it did the work.





              share|improve this answer
























                up vote
                0
                down vote













                I had a similar issue back then when I was installing Ubuntu alonside Win7 & Win10, I made it through:



                1. Installing Ubuntu on a separate partition .

                2. After installation I found that grub won't read Windows Installations, tried sudo upgrade-grub but still no resolution.

                3. Found a utiltity named boot-repair and it did the work.





                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  I had a similar issue back then when I was installing Ubuntu alonside Win7 & Win10, I made it through:



                  1. Installing Ubuntu on a separate partition .

                  2. After installation I found that grub won't read Windows Installations, tried sudo upgrade-grub but still no resolution.

                  3. Found a utiltity named boot-repair and it did the work.





                  share|improve this answer












                  I had a similar issue back then when I was installing Ubuntu alonside Win7 & Win10, I made it through:



                  1. Installing Ubuntu on a separate partition .

                  2. After installation I found that grub won't read Windows Installations, tried sudo upgrade-grub but still no resolution.

                  3. Found a utiltity named boot-repair and it did the work.






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 15 at 19:58









                  Vishesh Gautam

                  36011




                  36011




















                      up vote
                      0
                      down vote













                      Thank you to @oldfred to guide me to the right path. I solved this way




                      Solution:



                      1. Download Windows 10 ISO from Microsoft Webpage

                      2. Create a bootable USB using Unetbootin

                      3. Boot Windows 10 USB and select "Repair" -> "Advanced Options" -> "Command Prompt"

                      4. Insert the following commands to delete partitions including Ubuntu:

                      Start diskpart utility




                      diskpart




                      Select the disk X where you want to install Windows Boot Manager and Ubuntu 18.04




                      list disk



                      select disk X




                      Erase disk and partitions




                      clean



                      convert disk to gpt



                      convert gpt




                      Create partition efi 260mb and format as fat 32




                      create partition efi size=260



                      format quick fs=fat32




                      Check that everything is correct




                      list partition




                      Note the volume letter where the Windows OS is installed.




                      list volume




                      Exit from diskpart utility




                      exit




                      Rebuild Windows Boot Manager




                      bcdboot X:windows Note: Replace "X" with the volume letter of the Windows > OS partition.




                      In my case, I had to use it twice. One for Work partition and another for Games partition.



                      1. Install Ubuntu as normally do in the same disk as Windows Boot Manager.

                      Now, when you start your computer Grub2 will ask you if you want to start Ubuntu or Windows Boot Manager.






                      share|improve this answer




















                      • Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
                        – oldfred
                        May 16 at 18:27














                      up vote
                      0
                      down vote













                      Thank you to @oldfred to guide me to the right path. I solved this way




                      Solution:



                      1. Download Windows 10 ISO from Microsoft Webpage

                      2. Create a bootable USB using Unetbootin

                      3. Boot Windows 10 USB and select "Repair" -> "Advanced Options" -> "Command Prompt"

                      4. Insert the following commands to delete partitions including Ubuntu:

                      Start diskpart utility




                      diskpart




                      Select the disk X where you want to install Windows Boot Manager and Ubuntu 18.04




                      list disk



                      select disk X




                      Erase disk and partitions




                      clean



                      convert disk to gpt



                      convert gpt




                      Create partition efi 260mb and format as fat 32




                      create partition efi size=260



                      format quick fs=fat32




                      Check that everything is correct




                      list partition




                      Note the volume letter where the Windows OS is installed.




                      list volume




                      Exit from diskpart utility




                      exit




                      Rebuild Windows Boot Manager




                      bcdboot X:windows Note: Replace "X" with the volume letter of the Windows > OS partition.




                      In my case, I had to use it twice. One for Work partition and another for Games partition.



                      1. Install Ubuntu as normally do in the same disk as Windows Boot Manager.

                      Now, when you start your computer Grub2 will ask you if you want to start Ubuntu or Windows Boot Manager.






                      share|improve this answer




















                      • Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
                        – oldfred
                        May 16 at 18:27












                      up vote
                      0
                      down vote










                      up vote
                      0
                      down vote









                      Thank you to @oldfred to guide me to the right path. I solved this way




                      Solution:



                      1. Download Windows 10 ISO from Microsoft Webpage

                      2. Create a bootable USB using Unetbootin

                      3. Boot Windows 10 USB and select "Repair" -> "Advanced Options" -> "Command Prompt"

                      4. Insert the following commands to delete partitions including Ubuntu:

                      Start diskpart utility




                      diskpart




                      Select the disk X where you want to install Windows Boot Manager and Ubuntu 18.04




                      list disk



                      select disk X




                      Erase disk and partitions




                      clean



                      convert disk to gpt



                      convert gpt




                      Create partition efi 260mb and format as fat 32




                      create partition efi size=260



                      format quick fs=fat32




                      Check that everything is correct




                      list partition




                      Note the volume letter where the Windows OS is installed.




                      list volume




                      Exit from diskpart utility




                      exit




                      Rebuild Windows Boot Manager




                      bcdboot X:windows Note: Replace "X" with the volume letter of the Windows > OS partition.




                      In my case, I had to use it twice. One for Work partition and another for Games partition.



                      1. Install Ubuntu as normally do in the same disk as Windows Boot Manager.

                      Now, when you start your computer Grub2 will ask you if you want to start Ubuntu or Windows Boot Manager.






                      share|improve this answer












                      Thank you to @oldfred to guide me to the right path. I solved this way




                      Solution:



                      1. Download Windows 10 ISO from Microsoft Webpage

                      2. Create a bootable USB using Unetbootin

                      3. Boot Windows 10 USB and select "Repair" -> "Advanced Options" -> "Command Prompt"

                      4. Insert the following commands to delete partitions including Ubuntu:

                      Start diskpart utility




                      diskpart




                      Select the disk X where you want to install Windows Boot Manager and Ubuntu 18.04




                      list disk



                      select disk X




                      Erase disk and partitions




                      clean



                      convert disk to gpt



                      convert gpt




                      Create partition efi 260mb and format as fat 32




                      create partition efi size=260



                      format quick fs=fat32




                      Check that everything is correct




                      list partition




                      Note the volume letter where the Windows OS is installed.




                      list volume




                      Exit from diskpart utility




                      exit




                      Rebuild Windows Boot Manager




                      bcdboot X:windows Note: Replace "X" with the volume letter of the Windows > OS partition.




                      In my case, I had to use it twice. One for Work partition and another for Games partition.



                      1. Install Ubuntu as normally do in the same disk as Windows Boot Manager.

                      Now, when you start your computer Grub2 will ask you if you want to start Ubuntu or Windows Boot Manager.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 16 at 16:20









                      Sher852

                      11




                      11











                      • Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
                        – oldfred
                        May 16 at 18:27
















                      • Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
                        – oldfred
                        May 16 at 18:27















                      Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
                      – oldfred
                      May 16 at 18:27




                      Sounds like you converted to a new UEFI install. Windows only boots from gpt with UEFI and only from MBR with BIOS. And then if UEFI better to have all drives as gpt and all installs as UEFI.
                      – oldfred
                      May 16 at 18:27












                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036667%2finstall-ubuntu-18-04-alongside-two-windows-10%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                      Trouble downloading packages list due to a “Hash sum mismatch” error

                      How do I move numbers in filenames, in a batch renaming operation?