File "save as"

  • Thread starter Thread starter B-Dog
  • Start date Start date
B

B-Dog

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!
 
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.
 
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 said:
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 (*.*)|*.*"
 
That is pretty much what I'm trying to do. I may have missed something,
I'll try it. Thanks
 
Back
Top