Your welcome
stylez500
Posts
-
C# App to Split Files -
C# App to Split Filesyou right home work 4 your self
-
C# App to Split Fileswhat is that soposto mean?? That C# code is for those who want to create split file app jst copy n paste n modify put in buttons etc. At one point i needed one so i put this out for those who where in my position!!!!!
-
C# App to Split Fileswhat is that soposto mean?? That C# code is for those who want to create split file app jst copy n paste n modify put in buttons etc. At one point i needed one so i put this out for those who where in my position!!!!!
-
C# App to Split FilesBy stylesmylez using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace SplitFile { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private String _sPLITe = null; //private SaveFileDialog sPLITeFM; private void btnSplit_Click(object sender, EventArgs e) { //statusBar.Text = DateTime.Today; OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Open Photo"; dlg.Filter = "Windows Bitmap Files (*.bmp)|*.bmp" + "|All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { try { //pbxPhoto.Image = new Bitmap(dlg.OpenFile()); _sPLITe = dlg.FileName; Split300DividedbyLenthorSizeOfFile(_sPLITe); } catch (Exception ex) { MessageBox.Show("Unable to load file: " + ex.Message); } } dlg.Dispose(); } private void Split300DividedbyLenthorSizeOfFile(string inputFile) { //string inputFile = txtInputFile.Text; // Substitute this with your Input File FileStream fs = new FileStream(inputFile, FileMode.Open, FileAccess.Read); //int numberOfFilesx = Convert.ToInt32(txtChunks.Text); //int sizeOfEachFilex = (int)Math.Ceiling((double)fs.Length); //txtChunks.Text= string txtChunksx; ////new byte [(int)fs.Length / 300000000]); //int numberOfFilexs = // (Convert.ToInt32(fs.Length / 1500000)); //int numberOfFiles = Convert.ToInt32(txtChunks.Text); int sizeOfEachFile = (int)Math.Ceiling((double) fs.Length / //Devided By inserted Peace to get Amount example 3000/1500=2 (Convert.ToInt32(fs.Length / 1500000))); for (int i = 1; i <= //Devided By inserted Peace MB to get Amount. example 3000/1500=2 (Convert.ToInt32(fs.Length / 1500000)) ; i++) { string baseFileName = Path.GetFileNameWithoutExtension(inputFile);