{"action":"created","issue":{"url":"https://api.github.com/repos/donmelton/video_transcoding/issues/48","repository_url":"https://api.github.com/repos/donmelton/video_transcoding","labels_url":"https://api.github.com/repos/donmelton/video_transcoding/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/donmelton/video_transcoding/issues/48/comments","events_url":"https://api.github.com/repos/donmelton/video_transcoding/issues/48/events","html_url":"https://github.com/donmelton/video_transcoding/issues/48","id":135120658,"number":48,"title":"Need help automating on windows 10","user":{"login":"HolySorcerer","id":17364039,"avatar_url":"https://avatars.githubusercontent.com/u/17364039?v=3","gravatar_id":"","url":"https://api.github.com/users/HolySorcerer","html_url":"https://github.com/HolySorcerer","followers_url":"https://api.github.com/users/HolySorcerer/followers","following_url":"https://api.github.com/users/HolySorcerer/following{/other_user}","gists_url":"https://api.github.com/users/HolySorcerer/gists{/gist_id}","starred_url":"https://api.github.com/users/HolySorcerer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HolySorcerer/subscriptions","organizations_url":"https://api.github.com/users/HolySorcerer/orgs","repos_url":"https://api.github.com/users/HolySorcerer/repos","events_url":"https://api.github.com/users/HolySorcerer/events{/privacy}","received_events_url":"https://api.github.com/users/HolySorcerer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-02-20T21:06:33Z","updated_at":"2016-02-22T07:36:55Z","closed_at":null,"body":"Sorry if this is the wrong place for this, but my scripting experience is near zero and I figured who better to help automate this than the author.\r\n\r\nSo I'm just trying to set up a simple script where the transcoder will run on a schedule, search an input directory for .mkv files, transcode them to an output directory, and then delete the original files.  I'm just looking for a simple setup for the mother in laws HTPC.  I'm trying to take most of the effort out of her ripping her dvd collection.\r\n\r\nThank you for your assistance."},"comment":{"url":"https://api.github.com/repos/donmelton/video_transcoding/issues/comments/187055262","html_url":"https://github.com/donmelton/video_transcoding/issues/48#issuecomment-187055262","issue_url":"https://api.github.com/repos/donmelton/video_transcoding/issues/48","id":187055262,"user":{"login":"chucker","id":20194,"avatar_url":"https://avatars.githubusercontent.com/u/20194?v=3","gravatar_id":"","url":"https://api.github.com/users/chucker","html_url":"https://github.com/chucker","followers_url":"https://api.github.com/users/chucker/followers","following_url":"https://api.github.com/users/chucker/following{/other_user}","gists_url":"https://api.github.com/users/chucker/gists{/gist_id}","starred_url":"https://api.github.com/users/chucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chucker/subscriptions","organizations_url":"https://api.github.com/users/chucker/orgs","repos_url":"https://api.github.com/users/chucker/repos","events_url":"https://api.github.com/users/chucker/events{/privacy}","received_events_url":"https://api.github.com/users/chucker/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T07:36:55Z","updated_at":"2016-02-22T07:36:55Z","body":"Yeah, you probably want to wrap the Remove-Item call in a condition:\r\n\r\n```\r\nif ($LASTEXITCODE -eq 0)\r\n{\r\n  Remove-Item \"$file\"\r\n }\r\n```"}}