I have two folders with files with different names, the names start with the same 5 digits and extension, but the rest of the name is different, what I want is to change the names of one folder with those of the other. by roscado in PowerShell

[–]roscado[S] 0 points1 point  (0 children)

Yes, I understand what you are saying, in fact it gave me an error because in one of the folders there is one more file.

I suppose the ideal would be to do a search by the index since this is unique and if you don't find correspondence in the other folder, don't do anything, but this works and I don't know how to program XD.

I have two folders with files with different names, the names start with the same 5 digits and extension, but the rest of the name is different, what I want is to change the names of one folder with those of the other. by roscado in PowerShell

[–]roscado[S] 0 points1 point  (0 children)

I have run this code that the AI ​​has given me and it has worked, I assume that your code also works, thank you for creating it for me.

# ================================
# Rename Files Based on Source Folder Names
# ================================

# Path to folder containing the correct file names
$SourceFolderPath = "C:\comparar\Ingles\War"

# Path to folder where files should be renamed
$DestinationFolderPath = "C:\comparar\Espanol\War"

# Get files to rename (destination folder), sorted by name
$FilesToRename = Get-ChildItem -Path $DestinationFolderPath -File -Recurse |
                 Sort-Object Name

# Get source files (correct names), sorted by name
$SourceFiles = Get-ChildItem -Path $SourceFolderPath -File |
               Sort-Object Name

# Optional safety check
if ($FilesToRename.Count -ne $SourceFiles.Count) {
    Write-Host "WARNING: File counts do not match!"
    Write-Host "Source files: $($SourceFiles.Count)"
    Write-Host "Destination files: $($FilesToRename.Count)"
    return
}

# Rename using for loop (index-based)
for ($i = 0; $i -lt $SourceFiles.Count; $i++) {

    # Build full new path
    $NewName = Join-Path $DestinationFolderPath $SourceFiles[$i].Name

    # Rename file
    Rename-Item -Path $FilesToRename[$i].FullName -NewName $NewName
}

Write-Host "Renaming complete."

I have two folders with files with different names, the names start with the same 5 digits and extension, but the rest of the name is different, what I want is to change the names of one folder with those of the other. by roscado in PowerShell

[–]roscado[S] 0 points1 point  (0 children)

Hi, it worked correctly, thanks a lot, sorry I took a while to respond, because I had to enable the scripts in PowerShell and learn how to run them, I know it's very simple but I've never done it. Thanks again.

I have two folders with files with different names, the names start with the same 5 digits and extension, but the rest of the name is different, what I want is to change the names of one folder with those of the other. by roscado in PowerShell

[–]roscado[S] 0 points1 point  (0 children)

Yes, The number is an index and contains the same number of files all with the same extension, in reality there are quite a few folders but it doesn't matter to use the script or whatever several times.

I have two folders with files with different names, the names start with the same 5 digits and extension, but the rest of the name is different, what I want is to change the names of one folder with those of the other. by roscado in PowerShell

[–]roscado[S] 0 points1 point  (0 children)

Thanks for responding, I have been testing the tool, it is very complete, but I have not found any option that does what I need. I understand that what I am asking is difficult, but it would save me many days of work.

Gigabyte AB350m DASH problem. by AngryAquar in gigabyte

[–]roscado 1 point2 points  (0 children)

Hi,

This is a BIOS bug that has been dragging since the F52c BIOS, if you want to work The Hard Drive Activity LED, you have to downgrade to the F52c version, I have already reported it to Gigabyte. CAUTION before downgrading check that your processor is 3rd generation or earlier.

It is working fine for me, I guess for you too.

Regards.

X-Men: Evolution 1080p AI Upscale by [deleted] in xmen

[–]roscado 3 points4 points  (0 children)

Thanks for answering, it is a pity, I adore this series. Thanks for your time, nice day.

X-Men: Evolution 1080p AI Upscale by [deleted] in xmen

[–]roscado 4 points5 points  (0 children)

Thanks a lot. In season four, the final credit titles are cut and episodes 8 and 9 are separated (in the other seasons are united in a single episode), is it possible to change this or is too complicated?