Click here to Skip to main content
15,908,444 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to save a file to a specific folder in windows application

plz help

thanks in advance .
Posted

use OpenFileDialog[^] and File.Copy Method[^]

VB
'detination filename
Dim newFileName As String = "C:\NewImages\NewFileName.jpg"

' if the user presses OK instead of Cancel
If openFileDialog1.ShowDialog() = DialogResult.OK Then
	'get the selected filename
	Dim filename As String = openFileDialog1.FileName

	'copy the file to the new filename location and overwrite if it already exists 
	'(set last parameter to false if you don't want to overwrite)
	System.IO.File.Copy(filename, newFileName, True)
End If
 
Share this answer
 
v2
Comments
neeraj_ 23-May-14 7:10am    
where is files saving location sir
DamithSL 23-May-14 7:12am    
you can set path to newFileName
neeraj_ 23-May-14 7:15am    
sir i want to give the location of file to server how to give that location and where
plz help sir
i'm beginner
Hello ,
you may use SaveFileDialog to save file in specific folder.
Refer: SaveFileDialog Box in VB.NET
thanks
 
Share this answer
 

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