Thanks to OP who without the initial script i would have spent a lot longer writing from scratch. Hopefully this will help anyone that needs just the filename without ext. Write-Host "> File Done: "$ModName -f greenĮdit - Copy and paste to powershell or save and call the script from within powershell. &"$PropEdit" "$ModPath" -edit info -set "title=""$ModName" Write-Host "> Setting file: "$ModName -f yellow (Alternatively, you can drag&drop a file into the list.) Click 'Convert/Save' button. After that, it should be added to the list. From main menu select 'Media' > 'Convert / Save.'. Set-ItemProperty $ModPath -name IsReadOnly -value $false So to convert an MKV file to MP4: Run 'VLC media player'. Write-Host "> Set item property "$ModPath -f red This.4 posts I have a problem with the batch rename feature in Windows 10. Read-Host -Prompt "Press any key to continue or CTRL+C to quit" This is when you select multiple files, right click and select rename and then type in the new name into the first files name field. Write-Host "Count of files to modify:" $unt -f red -b yellow Write-Host "Path of MKVToolNix is: $PropEdit" -f yellow Write-Host "Looking for video files in: $VideoPath" -f yellow # Comment the following lines to removed confirmation prompts $ModFiles = Get-ChildItem -Path "$VideoPath" -Recurse -File -Include *.mkv $PropEdit = "C:\Program Files\MKVToolNix\mkvpropedit.exe" OPs script was setting the mkv name as the full path including filename and extension, i wanted only filename with no path or extension. The foreach loop now uses variables correctly instead of doing over the get-childitem command. I was looking for a powershell script, but this didn't quite do what i wanted, and i noticed it had a bit more cmd shell mixed in that tingles my spidy senses, so i removed. $ModFiles = `Get-ChildItem -Path "$VideoPath" -Name -Recurse -File -Include *.mkv | ForEach #Set this part to the video files (modify) #This is the path to your MKVToolNix (modify) *update on 9/30 moved $ModFiles variable earlier in script #SET THESE VARIABLES as needed This worked well for me including nested files. ![]() ![]() Powershell Code to update the property Title to match the actual file name on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |