Board index » Visual Studio » File "save as"

File "save as"

Visual Studio292
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!


-
 

Re:File "save as"



"B-Dog" <bdog4@hotmail.com>wrote in message



Quote
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.





-

Re:File "save as"

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" <BrianDH@discussions.microsoft.com>wrote in message

Quote
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!

>

>

>





-

Re:File "save as"

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

Quote
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" <BrianDH@discussions.microsoft.com>wrote in message

news:541801BC-F5F3-42D4-942D-D32A54954880@microsoft.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!

>>

>>

>>









-