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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.