[Solved] power shell script to get drive space ( percentage used and free ) [duplicate]

[ad_1] You can try this: Get-WmiObject -Class win32_Logicaldisk -ComputerName localhost | where {($_.DriveType -eq 3 -or $_.DriveType -eq 2) -and $_.FileSystem -ne $null } | Select -Property @{Name=”Volume”;Expression = {$_.DeviceID -replace “:”,””}}, @{Name=”Free”;Expression = { “{0:N0}%” -f (($_.FreeSpace/$_.Size) * 100) } } [ad_2] solved power shell script to get drive space ( percentage used and … Read more

[Solved] After Executing a exe from command line command line should wait for the completion of exe

[ad_1] What you are asking for cannot be handled in the executable. The console is launching the executable and not waiting for it to exit. That is a console issue, not an executable issue. You need to use the console’s start command to run the executable so you can use the command’s /wait parameter: start … Read more

[Solved] PHP debuging printing into command line [closed]

[ad_1] You can write the variable into a file and “tail” that file on terminal. function writelog($msg) { file_put_contents(FILE_PATH,$msg); } You can also use error_log function instead of file_put_content. But i am not sure whether its an error message or not. On terminal just run tail -f FILE_PATH P.S. FILE_PATH is absoulte path of the … Read more

[Solved] Opening a text file is passed as a command line parameter [closed]

[ad_1] A starting point. Then what you want to do with the contents of the file is up to you using System.IO; // <- required for File and StreamReader classes static void Main(string[] args) { if(args != null && args.Length > 0) { if(File.Exists(args[0])) { using(StreamReader sr = new StreamReader(args[0])) { string line = sr.ReadLine(); … Read more