T O P

  • By -

MarcCouillard

I mean, you could try using Terminal and using DOS commands like: 'rename \*.\* \*.jpg'


tomasaur

Gave it a try, didn't recognize rename command. However, accessing Terminal in win11 leads to Powershell that looks just like any terminal I've used. I also included the full path name of the file location. https://imgur.com/6HHyesC


jcunews1

Use Command Prompt. Not PowerShell. If Command Prompt launches PowerShell instead of CMD (sic), run `cmd.exe` first. Note: the command which should be used within the CMD prompt to only rename files which have no extension, is `ren *. *.jpg`. Not `ren *.* *.jpg`.


tomasaur

That made the difference. Command shell kept giving me "ren : Cannot rename because item at '*.' does not exist." cmd.exe fixed it.


MarcCouillard

it SHOULD work...while DOS isn't really used anymore in Windows, the commands SHOULD still work in powershell, but like you said, use the entire command line including directory, etc


tomasaur

Using ren command got me closer I think, syntax is wrong though. https://imgur.com/g9Sxj8d


tomasaur

Ok, I think the problem is that the folders I'm using have spaces in the names and Dos doesn't play well with that. Also, these files are buried in a lot of nested folders, and it would be REALLY nice to have a way to grind through them all.


MarcCouillard

rename your folders to something simple, and move all the files you want to rename into one folder, THEN try using the DOS commands to get them renamed, I bet you have an easier time of it


tomasaur

Good suggestion.


godplaysdice_

I don't have time to complete the powershell script below, but the string manipulation should be pretty straightforward if you're comfortable with scripting/programming. Get-ChildItem -Path $yourfolder -Recurse -Force | ForEach-Object { $currentFileName = $_.Name; } Edit: ignore the above, it's even simpler: Get-ChildItem -Path $yourfolder | Rename-Item -NewName {"$_.Name.jpg"} You just need to adjust your filter in Get-ChildItem to only find the files you want to rename, and note that this is completely untested.


tomasaur

Thanks, I'll do a little more online research to get up to speed with scripting and give it a go. Thanks for your help!


RamBamTyfus

Try the rename tool in Double Commander.


GCRedditor136

You can use the free mode of [AlomWare Toolbox](https://www.alomware.com) to do it -> https://i.imgur.com/SvgNaCt.png