using System; using System.Collections.Generic; using System.Text; using System.IO; namespace UnZipTest { public class UnZip { public void Run (string path,string extractPath){ DirectoryInfo dirInfo = new DirectoryInfo(path); System.Diagnostics.Process P = new System.Diagnostics.Process(); if(Directory.Exists(extractPath)==false){ Directory.CreateDirectory(extractPath); } string UnZipCmd = null; foreach(FileInfo fl in dirInfo.GetFiles("*.zip")){ try { string password = "123"; string zipExtract = extractPath + "\\" + fl.Name + "_" + Guid.NewGuid().ToString().Substring(0, 4); if (password.Trim().Length == 0) { UnZipCmd = string.Format("-o \"{0}\" \"{1}\"", fl.FullName, zipExtract); P = System.Diagnostics.Process.Start(@"C:\Program Files\WinZip\wzunzip", UnZipCmd); } else{ UnZipCmd = string.Format("-s\"{0}\" -o \"{1}\" \"{2}\"",password, fl.FullName, zipExtract); P = System.Diagnostics.Process.Start(@"C:\Program Files\WinZip\wzunzip", UnZipCmd); } P.WaitForExit(); } catch (Exception ex){ throw ex; } } } } }
Quick Notes for easy understanding. Chapters are on C#.Net,Linq,OOPS,Design Patterns,UML,Tools for development, Databases and many others. - Sid
Friday, August 20, 2010
Error - Application popup: wzunzip.exe while using WinZip 14.5 command line in Window service.
Thursday, August 19, 2010
Speed Test Details
Kilobit per second
A kilobit per second (kbit/s or kb/s or kbps) is a unit of data transfer rate equal to:
- 1,000 bits per second or
- 125 bytes per second.
[edit] Megabit per second
A megabit per second (Mbit/s or Mb/s or Mbps; not to be confused with mbit/s which means, literally, millibit per second) is a unit of data transfer rate equal to:
- 1,000,000 bits per second or
- 1,000 kilobits per second or
- 125,000 bytes per second.
[edit] Gigabit per second
A gigabit per second (Gbit/s or Gb/s or Gbps) is a unit of data transfer rate equal to:
- 1,000 Megabits per second or
- 1,000,000 Kilobits per second or
- 1,000,000,000 Bits per second or
- 125,000,000 bytes per second
Monday, August 16, 2010
"upper" in case of schema.ini / oledb / excel sheet query
In case of querying with the Schema.ini / oledb / excel sheet query and u need to apply a check based on upper case then you need to declare like this.
UCASE(RTRIM(LTRIM((C.NAME)))) = UCASE(RTRIM(LTRIM((A.NAME))))
For lower case use this- LCASE.
Monday, August 9, 2010
Create or Delete A Service in Windows XP
Create or Delete A Service in Windows XP
Services are added from the Command Prompt. You need to know the actual service name as opposed to what Microsoft calls the Display Name. For example, if you wanted to create or delete the Help and Support service, the name used at the Command Prompt would be "helpsvc" rather than the Display Name of "Help and Support". The actual service name can be obtained by typing services.msc in Run on the Start Menu and then double clicking the Display Name of the service. Once you know the name;
To Create A Service
- Start | Run and type cmd in the Open: line. Click OK.
- Type: sc create <service name>
- Reboot the system
To Delete A Service
- Start | Run and type cmd in the Open: line. Click OK.
- Type: sc delete <service name>
- Reboot the system
If you prefer to work in the registry rather than through the command prompt to delete services;
- Click Start | Run and type regedit in the Open: line. Click OK.
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
- Scroll down the left pane, locate the service name, right click it and select Delete.
- Reboot the system
Code Formater
Paste Here Your Source Code | ||||||||||||||
Source Code Formatting Options | ||||||||||||||
|
||||||||||||||
Copy Formatted Source Code | ||||||||||||||
Preview Of Formatted Code |