Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

duhow's profile on WallpaperFusion.com

Code

// Set at beginning:
using System.Diagnostics;
using System.Collections.Generic;

// --------------

Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.StartInfo.FileName = "fsutil";
p.StartInfo.Arguments = "volume diskfree c:";

string salida = "";
string[] separator = new string[] {"\n"};
string[] output;

p.Start();
salida = p.StandardOutput.ReadToEnd();
p.WaitForExit();

output = salida.Split(separator, StringSplitOptions.None);
string total = output[1].Substring(41);
total = total.Substring(1, total.Length - 1);
string libre = output[2].Substring(41);
libre = libre.Substring(1, libre.Length - 1);

long ttot = Int64.Parse(total);
long tlib = Int64.Parse(libre);
long tfin = tlib / 1024 / 1024;
long tmeg = tfin % 1024;
tfin = tfin / 1024;

BFS.Speech.TextToSpeech(tfin.ToString() + " gigas y " + tmeg.ToString() + " megas");


Working for Spanish text, as it cuts the space bytes using substring. You may adapt the script for your language. :laugh:
Feb 26, 2017 (modified Mar 8, 2017)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks for sending this over! We'll add it to the repository :)
Feb 28, 2017  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)