Yes, you can rename multiple folders using a command prompt.
Yes, you can rename multiple folders using a command prompt.
I have several folders in the same folder that end with .V2, and you want to rename them to .V6 while keeping the part before .V2 unchanged. You're using Windows 10 and haven't succeeded yet.
Batch files aren't directly compatible with PowerShell. They run in a different environment and won't work as expected.
PowerShell commands function only in PowerShell. They won’t run in CMD. This script should work in PowerShell (as long as you enter a valid folder and avoid duplicate names). You might want to check if translating it to CMD is possible, or consider creating a batch file that executes the PowerShell script.
I noticed several repeated lines in your input. Please paste the full code at once so I can process it correctly.
I transferred the file to Notepad, adjusted the location, and then used PowerShell to copy everything.
Yea, but you have like 8 lines of "C:\Users\.." etc., while I only have one line and then the entire script: Plus, didn't the script work for you? You want everything with .V6 at the end replaced with .V2. I don't see any .V6 in your screenshot (anymore).
Like I said in my edited post (written in red), it didn't work for me. This is what I'm doing: My guess is that posting that command here breaks it. EDIT: I thought I edited this yesterday, but I guess I didn't save it properly. This command does work, but I needed to save it into a .ps1 file and load it with PowerShell. That being said, you had the V2 and V6 thing in reverse, so I swap them it it works fine now, thanks. Now I either need to convert my other Command prompt batch file to PowerShell or have this one into Command Prompt. Edited June 20, 2020 by the_importer
You could achieve this using software. BulkRenameUtility offers a poor user interface, but it handles more than just this task.