I'm trying to adapt this script that is called through a contextual menu:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\RenameWithTimestamp]
@="Rename: Add Date Modified"
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\RenameWithTimestamp\Command]
@="PowerShell.exe -WindowStyle Hidden -Command \"( Get-Item -LiteralPath '%1' ) | %%{ Rename-Item -LiteralPath $_.FullName -NewName ( '{0:yyyyMMdd_HHmmss} {1} {2}' -f $_.LastWriteTime,$_.BaseName, $_.Extension ) }\""
I would like to be able to execute this PowerShell script without right click contextual menu, only select the files and then launch the script that rename the selected files. Any idea?