I run a PowerShell script from the context menu on a selected file. But I struggle to find the way to simply get the file name of this file.
The file name selected is
1.mp3 which is inside the directory
I managed to extract some information about the selected item such as:
$FolderPath = Get-Location $FolderName = [IO.Path]::GetFolderName($FolderPath)
I tried to get its file name using things like
$File_path = %1 (since regedit use %1 which is suppose to contain the path).