I'm trying to add a watcher for a folder, once file is created, start a program
$script= "C:\test.py"
$watcher.Path ="e:\my folder\test folder\dropbox"
Start-Process cmd -Argument "/k python $script $path"
Problem is that, this will always get me error saying e:\my no such file
I know this is an issue with space, but I tried the following, still get same error
Start-Process cmd -Argument "/k python $script '$path'"
does anyone know how to fix this?
many thanks