473,756 Members | 4,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File "save as"

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
3 2552

"B-Dog" <bd***@hotmail. com> wrote in message
news:em******** ******@TK2MSFTN GP09.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
Not sure I understand the problem, but will this do it?

Dim FileDialogContr ol As New SaveFileDialog
FileDialogContr ol.Filename = "FileInQuestion .exe"
FileDialogContr ol.InitialDirec tory = "C:\"
FileDialogContr ol.Filter = "HTML Files (*.htm)|*.htm|H TML Files
(*.html)|*.html |TextFiles" & "(*.txt)|*.txt| All Files (*.*)|*.*"
FileDialogContr ol.Title = "Save File"
FileDialogContr ol.ShowDialog()

Greg

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

FileSaveDialogC ontrol.Filter = "HTML Files (*.htm)|*.htm|H TML Files (*.html)|*.html |TextFiles" & "(*.txt)|*.txt| All Files (*.*)|*.*" FileSaveDialogC ontrol.Title = "Open File"
FileSaveDialogC ontrol.ShowDial og()
"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
That is pretty much what I'm trying to do. I may have missed something,
I'll try it. Thanks
"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message
news:uT******** ******@TK2MSFTN GP09.phx.gbl...
Not sure I understand the problem, but will this do it?

Dim FileDialogContr ol As New SaveFileDialog
FileDialogContr ol.Filename = "FileInQuestion .exe"
FileDialogContr ol.InitialDirec tory = "C:\"
FileDialogContr ol.Filter = "HTML Files (*.htm)|*.htm|H TML Files
(*.html)|*.html |TextFiles" & "(*.txt)|*.txt| All Files (*.*)|*.*"
FileDialogContr ol.Title = "Save File"
FileDialogContr ol.ShowDialog()

Greg

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

FileSaveDialogC ontrol.Filter = "HTML Files (*.htm)|*.htm|H TML Files (*.html)|*.html |TextFiles" & "(*.txt)|*.txt| All Files (*.*)|*.*"
FileSaveDialogC ontrol.Title = "Open File"
FileSaveDialogC ontrol.ShowDial og()
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
20693
by: Richie | last post by:
What I want is to have a link to a file (it could be a .zip, .exe, .jpg, ..txt or even .html) and when the user clicks on it they are prompted with the Save As box, as opposed to it opening in the browser. I think I need to do something like: $fp = fopen($filetooutput, "rb"); $thefile = fread($fp, filesize($thefiletooutput)); header("Content-type: ???/???"); not sure what to put instead of the ??? echo $thefile;
4
16359
by: Dariusz | last post by:
I have the following code which executes successfully to call the browsers "save as" box... //Screensavers if ($FileType == 'scr') { // We'll be outputting a screensaver header('Content-type: application/octet-stream'); // It will be called test.scr header('Content-Disposition: attachment; filename="test.scr"');
2
2929
by: RickL | last post by:
I have an ASP application that uploads a specified file to the server. To retrieve the file, I simply assign the filepath and file to a hyperlink on the page. When you click "Save Target As" for some file types, I get the following error messsage: IE can not download <file> from <server>. IE was not able to open this internet site. The requested site is either unavalable or can not be found. Can anyone tell me how to save a file of any type?...
27
5088
by: Curious Angel | last post by:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to force the file to be saved, and in any event _not_ opened. Since the PDF will be in his cache in any event, I would just as soon place the employer in control of what directory he wishes to save it in, and there are two salient reasons for this: 1. I want him to OWN the document 2. I want him to FIND the document, quickly, on his hard drive In any...
4
5560
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. When the user clicks to start the download I would like to display the "Save As" dialog, allow the user to name a place to save the file, and then show the download progress bar while the file downloads Question: How do I make a windows "Save...
5
1880
by: Paul Sullivan | last post by:
We are a state agency that views protected medical information via our intranet. The screens even have privacy shields. Alarmingly, uses can "Print" and "Save As" which destroys the protection of the health information at the level we want. QUESTION: Can we shut those off?? Any other suggestions?? Paul Sullivan
1
7931
by: suitland | last post by:
Hi All, I am using the execCommand(SaveAs) function to save an HTML file as an xls file, and works fine when I open the program and open the file. Is there anyway I can trigger an Open dialog box asking if the user wants to open the file after the file finished downloading?
8
3631
by: asenthil | last post by:
Hai to all, if i'm having a file named as "tab.doc" which is a microsoft word document file ... i want to save it as another file as "tab1.doc" by using "save as" method.... Is there any "save as" method available for doing this process in VC++....
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.