By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,928 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,928 IT Pros & Developers. It's quick & easy.

File "save as"

P: n/a
I'm checking some files to see if the filenames are in a certain format and
if not I want to pull up a dialog box that gives me a save as with the file
that is in question. I have all the files in a certain directory and if it
doesn't meet my criteria then I want to do a "save as" to a different
location. How can I do that. I can't seem to get the save as dialog to
grab the filename of the file in question and ask for a place to save it.
Can anyone give me some help with the code for this or point me in the right
direction. Thanks!
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"B-Dog" <bd***@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
I'm checking some files to see if the filenames are in a certain format and if not I want to pull up a dialog box that gives me a save as with the file that is in question. I have all the files in a certain directory and if it doesn't meet my criteria then I want to do a "save as" to a different
location. How can I do that. I can't seem to get the save as dialog to
grab the filename of the file in question and ask for a place to save it.
Can anyone give me some help with the code for this or point me in the right direction. Thanks!


Post code.
Nov 20 '05 #2

P: n/a
Not sure I understand the problem, but will this do it?

Dim FileDialogControl As New SaveFileDialog
FileDialogControl.Filename = "FileInQuestion.exe"
FileDialogControl.InitialDirectory = "C:\"
FileDialogControl.Filter = "HTML Files (*.htm)|*.htm|HTML Files
(*.html)|*.html|TextFiles" & "(*.txt)|*.txt|All Files (*.*)|*.*"
FileDialogControl.Title = "Save File"
FileDialogControl.ShowDialog()

Greg

"BrianDH" <Br*****@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...
Sorry that was the file open Dialog.. you want the File Save dialog.

FileSaveDialogControl.Filter = "HTML Files (*.htm)|*.htm|HTML Files (*.html)|*.html|TextFiles" & "(*.txt)|*.txt|All Files (*.*)|*.*" FileSaveDialogControl.Title = "Open File"
FileSaveDialogControl.ShowDialog()
"B-Dog" wrote:
I'm checking some files to see if the filenames are in a certain format and if not I want to pull up a dialog box that gives me a save as with the file that is in question. I have all the files in a certain directory and if it doesn't meet my criteria then I want to do a "save as" to a different
location. How can I do that. I can't seem to get the save as dialog to
grab the filename of the file in question and ask for a place to save it. Can anyone give me some help with the code for this or point me in the right direction. Thanks!

Nov 20 '05 #3

P: n/a
That is pretty much what I'm trying to do. I may have missed something,
I'll try it. Thanks
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...
Not sure I understand the problem, but will this do it?

Dim FileDialogControl As New SaveFileDialog
FileDialogControl.Filename = "FileInQuestion.exe"
FileDialogControl.InitialDirectory = "C:\"
FileDialogControl.Filter = "HTML Files (*.htm)|*.htm|HTML Files
(*.html)|*.html|TextFiles" & "(*.txt)|*.txt|All Files (*.*)|*.*"
FileDialogControl.Title = "Save File"
FileDialogControl.ShowDialog()

Greg

"BrianDH" <Br*****@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...
Sorry that was the file open Dialog.. you want the File Save dialog.

FileSaveDialogControl.Filter = "HTML Files (*.htm)|*.htm|HTML Files (*.html)|*.html|TextFiles" & "(*.txt)|*.txt|All Files (*.*)|*.*"
FileSaveDialogControl.Title = "Open File"
FileSaveDialogControl.ShowDialog()
"B-Dog" wrote:
I'm checking some files to see if the filenames are in a certain format and
if not I want to pull up a dialog box that gives me a save as with the file that is in question. I have all the files in a certain directory and
if
it doesn't meet my criteria then I want to do a "save as" to a different
location. How can I do that. I can't seem to get the save as dialog
to grab the filename of the file in question and ask for a place to save

it. Can anyone give me some help with the code for this or point me in the right direction. Thanks!


Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.