0

I try to write a PowerShell script that asks user to give a video and audio name like:

$inputVideo = Read-Host "Video name"
$inputAudio = Read-Host "Audio name"

Then, before reading inputAudio, to prevent user to deleting video file, I want to keep my script busy with that video file, so if user try to delete that file he gets a OS prompt: "That file is in use"

How can I achieve this? Thank you.

0 Answers0