$count = Get-ChildItem -Path ./* -Include *.mp4 | Measure-Object | Select-Object -ExpandProperty Count $declaration = "const MAX = " $string = $declaration + $count $string | Out-File -Encoding utf8 -FilePath ".\max.js"