In PowerShell? You'll need to make use of Get-ChildItem then pipe it to Rename-Item with the NewName being the result of applying replace operation -which makes use of regular expressions- on the current name. The exact regular expression will depend on
what your scenario is, but here is an example that will replace a static string to get you started.
'xxxxxx-n-yyyyyy.ext' -replace '^([^-]+)(-n-)([^\.]+)(\.ext)$' , '$3$2$1$4'