Created
November 5, 2016 18:30
-
-
Save anonymous/4244b15dd26167dd62c145e10c66924b to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn create_bat_then_run_without_wait(filename_with_path_to_delete: &str) { | |
let bat_content = format!(r#####" | |
:redo | |
del "{}" | |
if exist "{}" goto redo | |
del %0 | |
"#####, filename_with_path_to_delete, filename_with_path_to_delete); | |
let cmd_path = std::env::var("ComSpec").unwrap(); | |
//TODO: write bat_content to a temporary file, and call ShellExecuteW | |
// with cmd_path to run the bat | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment