

Just use Copy-Item instead of Rename-Item if you want multiple identical files with different names
Just use Copy-Item instead of Rename-Item if you want multiple identical files with different names
That will crash if there is more than one line in individuals.txt, because by the second iteration ‘.\_2023 Summary Page.docx’ has been renamed.
I have no idea why this wouldn’t work on your machine - I’ve tested it on mine and it works fine. So maybe you have overlooked some small things:
If there are any other PDFs in the directory that you don’t want to rename, then the list of files is longer than the list of names.
If the PS window closes completely, you might have typed it into the terminal instead of running it as a script - then the problem might just be that you closed the if block too early, so PS immediately executes the exit
command.
If your list of new names contains a column label like in a one-column CSV, then it has one more line than there are files.
If the CSV file contains both the current names and the new names, this should work if you use the first line for column labels (I’m using OldName and NewName in this example):
Import-CSV $pathToCSV | ForEach-Object { Rename-Item $_.OldName $_.NewName }
If you just have a list of new names as a text file where the first line of the file is the new name for the first file (by name, sorted alphabetically), this should work:
$files = Get-ChildItem -File *.pdf | Sort-Object -Property Name #I think the output of Get-ChildItem is already sorted by name, but I'm not sure
$newNames = Get-Content $pathToTXT
if ($files.Count -ne $newNames.Count) {
Write-Error "The number of PDF files to be renamed does not match the number of new names"
exit
}
0..($files.Count - 1) | ForEach-Object { Rename-Item $files[$_] $newNames[$_] }
You only need mount points in each distro for partitions that you want to be able to access from that distro. If you don’t need access to your Arch system files from Debian, don’t mount the Arch partition in Debian.
But if you have a partition that you want to access from multiple distros, you don’t need to use the same mountpoint in each distro - just like a USB flash drive can be E:\ on one Windows computer and H:\ on another - that is just a name and the files on it are the same.
Mount points are specific to one install - for example, you can mount your Manjaro root partition as /mnt/manjaro on Fedora. From every distro’s perspective, the partition it is installed on is /.
You seem to be mixing up the locations of partitions and mount points - a partition is somewhere on a disk and a mount point is basically a sign that points to it, and every distro can have different signs that point to the same thing.
You can only mount one partition at one mount point, but any empty directory on one partition can be a mount point for another partition.
GPT is a partition table and is not used for Linux specifically, but on any computer with UEFI - it defines how to find partitions on a disk, but not how they are formatted.
ext4 is a filesystem - formatting a partition with ext4 means creating data structures that tell the OS where to find files and directories in the partition.
It’s similar to how drive letters work in Windows: the partition you installed it on is C:\ and you can assign any other letter to any other partition.
On Linux, the partition you installed it on is / and you can mount other partitions in any empty directory.
Usually you create an entry in /etc/fstab that tells the system which partition should be mounted where. I’d do that in each distro once you have installed all of them.
If you install your first distro without creating any partitions manually, the installer will probably create an EFI partition. Maybe it wouldn’t need to create one on your specific system, but it will probably do it anyway.
You can create dedicated partitions for /home, but unless you know why it makes sense in your specific situation, you shouldn’t.
The data partition is just another partition that you can mount somewhere, for example /mnt/storage.
If the installer doesn’t automatically create an EFI partition, you can create a small FAT16 or FAT32 partition (a few hundred MB should be enough).
The swap partition is just a swap partition - that is the partition type you select in your partitioning tool.
The storage partition can be any format you want. If you don’t need to access it from Windows, just use ext4.
Mount points are similar to drive letters, but more flexible. You can read these Wikipedia articles: https://en.wikipedia.org/wiki/Mount_(computing) https://en.wikipedia.org/wiki/Fstab
The order of the partitions shouldn’t matter - usually the EFI partition comes first if there is one at all, but as far as I know that isn’t actually required.
There are no BIOS partitions - you may be confusing the term with the BIOS partition scheme, but that doesn’t matter in this context “BIOS partitions” do exist, but they are irrelevant on modern machines - they are for booting GPT disks on systems that only support MBR disks.
If you need an EFI partition, the first installer will create one. As for the sizes, the recommendation in the other comment makes sense to me (one ≈60 GB partition per distro, one swap partition and one partition for your personal files that uses the remaining space on the disk).
Hibernation is an OS feature, so you can’t disable it in the BIOS. You can either disable it in all your distros or simply not use it.
A swap partition doesn’t have a filesystem - it has its own partition type and doesn’t contain files. The installer might create one automatically or it might not - if it asks how large it should be, a good rule of thumb is to use the same size as your RAM.
If that turns out not to be enough, you can create a swap file on a data partition later and if it’s too large, you just wasted a few GB but usually that doesn’t matter.
The first installer will install the bootloader automatically.
It will also create a swap partition unless you tell it not to, and all distros will use all swap partitions by default, so you don’t need more than one per disk.
If you don’t hibernate one distro and then boot another, sharing a swap partition isn’t a problem.
There shouldn’t be any significant difference between the GRUB versions that come with different distros, so the order in which you install the distros doesn’t really matter.
You can’t install multiple distros on one partition, so you need at least one partition per distro.
I think the easier solution would be not to use hibernation - either shut the system down properly or use suspend-to-RAM.
If everything works, the bootloader should be whichever GRUB version comes with the distro you install first and the other distros’ installers should just add entries to boot them.
Then the snippet won’t work because it only ever renames/copies the file
'_2023 Summary Page.docx'
. What are the actual names of the files you want to rename?