Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey programmers,

I've a little problem and I really need help.

How can I format a partition Like E:\ for example in my VB.Net application??

It may work by using windows API functions, but I don't know them!!

and thanks for any help.
Posted
Updated 6-Jan-12 1:14am
v2

1 solution

Try this

VB
Shell("format [drive:] [/q] [/fs:file-system]", vbHide)
'drive: Specifies the drive to format.
'/q Performs a quick format.
'/fs:file-system    Specifies the file system to use (FAT, FAT32, or NTFS)
 
Share this answer
 
Comments
Ahmed Yosri 6-Jan-12 7:18am    
Thank you for this info.
Mehdi Gholam 6-Jan-12 7:18am    
5'ed for its simplicity.
Ahmed Yosri 6-Jan-12 7:21am    
I've tried this function but it did not work!!!...
RDBurmon 6-Jan-12 7:24am    
Please post what you have tried ? I mean code..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900