IE downloads files without  extension as html type

Hi,
i wrote a piece of code to down load files. its working fine for all the filetypes which will have extension.
but if the file doesn't have any extension, then download prompt shows
FileName : aaaaa
Type : Html Document
and when saves it saves as txt file. how to stop this and save it as unknown type

I know this isn't an answer to the question you're asking, but are you sure you want that behavior? There might be times where you want an extensionless file to be loaded as a plain text file. At the very least, it will help make your site more compatible.
If all these files are collected in the same area on your system, it might be best to give them the .html extension.
You can do this relatively painlessly with virtually any scripting language. I know I've even seen an AppleScript that will go through a batch and change the extension for you. You might want a modified one that will first check for the start/end HTML tags in the file first to make sure you're only changing HTML files. A quick Google search for scripting a filename change will probably yield lots of results (check Perl and PHP resource sites as well).

Similar Messages

  • I find file without Extension after Download.

    In Firefox, when I am trying to download STL file from Email then it allows me to download such file without extension. That means I can't get file with Extension. . Why such thing happen ?

    Hi, Flash Player is a browser plug in, not a standalone player. It works thru your browser. Check in Safari and any other browser that you use for the Shockwave Flash plugin. Make sure it's Enabled.
    You can test each browser here and should be able to see the Flash Player logo(Red F) animate(spin). It will also display the version of Flash Player that you have Installed.
    http://www.adobe.com/software/flash/about/
    eidnolb

  • How to use Terminal to Find or Locate files without extensions?

    I'm conversant with the cli, but not a power-user.  I've discovered a fairly large number of audio files, across dozens of sometimes nested folders, that (somehow) lost their '.aif' extension and now appear as Unix Executable Files.  Upon appending said files with the proper extension, they are perfectly normal audio aif's.
    My Problem: using the Terminal, how can I search a directory tree to find those files *without* an extension, discriminating between files and folders, and then append the correct extension to only the files?
    I've tried a number of queries, mostly built around the idea of using 'filename.*', but for some reason searching for an extension omission (as opposed to a specified string) isn't so simple. 
    The following: ls -al *.
    Brings up 'No such file or directory'
    And the following ls -al .*
    Brings up files AND directories
    I need o discriminate between files and directories, finds all files without extensions, and rename them with the appropriate extension.
    Can anyone help?
    Best, Tom

    The following will find files without a file extension in the current working directory and any sub-directories->
    find . -type f ! -name "*.*"
    If you are confident that the files found are the appropriate audio file (in this case aif) then you could->
    find . -type f ! -name "*.*" -exec mv {} {}.aif \;

  • Edit PHP files without extension

    Hi,
    I'm currently developing a website with DW CS3 and I'm using
    apache's mod_rewrite so I have clean URL's. The thing is that doing
    this forces me to rename my php files e.g.
    index.php to
    index. Is there a way that DW recognizes these files as PHP
    files, so I have nice highlighted code?
    Greets,
    Nick

    Hello,
    Right clicking and selecting open is exactly the answer to
    the question you
    asked about how to open files without an extension.
    There are many young people and people just learning here, so
    all questions
    are answered.
    How was anyone supposed to know you meant something else, and
    that you
    already knew the answer was to right click and select open?
    You didn't mention DW was giving you errors until after 2
    people gave the
    answer to the question you asked.
    The fact that DW is giving you an error message when you try
    to open the
    file is something else entirely.
    So, if that's your actual question, can you expand on "DW
    keeps giving me
    errors" and share what the error messages are, so we can try
    and help you?
    Take care,
    Tim
    "magoo" <[email protected]> wrote in message
    news:gcr7s0$m9n$00$[email protected]..
    > Murray *ACE* wrote:
    >> Right click on the file and select Open.
    >>
    >>
    >> "magoo" <[email protected]> wrote in
    message
    >> news:gcr39p$r7o$01$[email protected]..
    >>> Alan wrote:
    >>>>> is it possible to open files without
    extension in DW?
    >>>>
    >>>> yes- but they will be treated as a plain
    text file, they won't be
    >>>> associated with any type of scripting type
    so no code hints or code
    >>>> coloring.
    >>>
    >>> That`s fine, so how does it work?
    >
    > Wow, what an ace you are. If it was that easy I would
    not have bothered
    > posting here ...
    >
    > --
    > Regards
    > magoo

  • Browser has a downloaded file without permission

    Greetings,
    During the usage of Firefox browser, suddenly i found downloaded file in the profile folder, but this is always happen each time i delete the file it comes back again, Fortunately i have a Norton Internet Security with the Download File Insight feature i could discover that file and followed the cache folder of Firefox Browser and it is not a virus,
    Now these issue was happened after i have installed a program named virtual router on Windows VISTA,
    After rename the file in cache folder to .exe extension it shows the setup file mentioned the wireless icon, by running it it shows the normal setup of Winhostspot,
    What shall i do to stop this downloading file without permission?
    Do i have to uninstall the virtual router software?
    I'm sure that i have no virus cause the Norton Internet Security is up to-date with all running its security features: Virus definition and Firewall ... etc.
    Even i have scanned the file by uploading it to http://metascan-online.com/
    Thanking your cooperation, we remain.
    Best Regards
    MOHAMAD GHOUL

    Is it a single file or a folder.
    Please mention the file name

  • Quick Look for files without extensions.

    I have many files without extensions that quick look does not recognize as text files. Bash shell scripts generally do not use an extension, for example (they are identified by their first line). Similarly I have a lot of text file notes w/o a ".txt" extensions.
    Is there any way to have quick look recognize these as text files? They currently have either text edit or textmate as their default "open with" app. I presume there is a config file of some sort for quick look that will let me default files with no extension to text files, but have not found it yet.

    Can't Quick Look for some text files
    Re: Is it possible to change the viewing format?
    Quick Look for files without extensions.
    Re: Can I view text files without a .txt extension in Quick Look?
    How do I add support to Quick Look

  • HT1338 I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    It should unzip if you double-cick.
    What are you seeing happen when you do that?
    Select a .zip file in the Finder and Get Info (cmd-i). What is set for it to Open With. It should be Archive Utility.

  • About "Upload and download files from ADF into blob type colum."

    hi
    Using JDeveloper 10.1.3.3.0 I have tried the example available for download from this blog post by Jakub Pawlowski:
    "Upload and download files from ADF into blob type colum."
    at http://kuba.zilp.pl/?id=1
    First a thank you to Jakub for this interesting example.
    I have a question about a PDF file that I uploaded using the example.
    The file has a size of 10445518 bytes.
    After I upload that file, the blob column has a value with a size of 10445516 bytes, 2 bytes less.
    SQL> select file_name, dbms_lob.getlength(stored_file) from blob_table;
    FILE_NAME
    DBMS_LOB.GETLENGTH(STORED_FILE)
    ADF-DeveloperGuide-4GL-B25947_01.pdf
                           10445516If I download that file using the example, it has the same size as the blob value, 10445516 bytes.
    If I open the downloaded file, using Adobe Reader 8.1.1, it first shows this message:
    "The file is damaged but is being repaired."
    After that, there is not problem using the PDF file in Adobe Reader.
    I have tried this with both Internet Explorer 6 and Firefox 2.0.0.11.
    I have also tried this with other (smaller) files, and those upload and download correctly.
    question:
    Why are those 2 bytes lost during upload?
    many thanks
    Jan Vervecken

    Hi!
    I can only post you my code that works for me and as I said I had same problems but can't remember what solved them. My code:
      public void fileUploaded(ValueChangeEvent event)
        FacesContext fc = FacesContext.getCurrentInstance();
        UploadedFile file = (UploadedFile) event.getNewValue();
        if (file != null && file.getLength() > 0)
          // here I have some messages written and a call to the method on AM to save the uploaded file to the DB
      private BlobDomain newBlobDomainForInputStream(InputStream in)
        throws SQLException, IOException
        BlobDomain loBlob = new BlobDomain();
        OutputStream out = loBlob.getBinaryOutputStream();
        writeInputStreamToWriter(in, out);
        in.close();
        out.close();
        return loBlob;
      private static void writeInputStreamToWriter(InputStream in,
                                                   OutputStream out)
        throws IOException
        byte[] buffer = new byte[8192];
        int charsRead = 0;
        while ((charsRead = in.read(buffer, 0, 8192)) != -1)
          out.write(buffer, 0, charsRead);
       * Launch the upload - see fileUploaded() for actual upload handling.
       * @return null navigation event - we stay on this page
      public String UploadButton_action()
        if (this.getMyInputFile().getValue() == null)
          FacesContext context = FacesContext.getCurrentInstance();
          FacesMessage message =
            new FacesMessage(FacesMessage.SEVERITY_WARN, JSFUtils.getStringFromBundle("fileupload.emptyfielderror"),
                             null);
          context.addMessage(this.getMyInputFile().getId(), message);
        return null;
       * Setter for inputFile UI Component.
       * @param inputFile inputFile UI component
      public void setMyInputFile(CoreInputFile inputFile)
        this.myInputFile = inputFile;
       * Getter for inputFile UI Component.
       * @return inputFile UI component
      public CoreInputFile getMyInputFile()
        return myInputFile;
      }fileUploaded is a valueChangeListener on inputFile and UploadButton_action is as the name says the action for upload button.
    Hope this helps. If not, than your problem is probably not the same as mine was, although the message about file corrupted was the same.
    Next thing you can check in this case is if your file exceeds max file upload size. I don't know the exact default value, but if the file is too long I think this upload logic will upload only a part of the file and save it to the DB which can also lead to the same file corrupted error.
    You can set the max upload value in web.xml like this:
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 5000K -->
    <param-value>5120000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 10,000K -->
    <param-value>15360000</param-value>
    </context-param>

  • FileFilter files without extension (*.)

    I want the file dialog to only show files without extension, so I set the filter to '*.', but the dialog shows no files at all.
    var legendFilter: FileFilter = new FileFilter("Legende", "*.");
    legendFileRef.browse([legendFilter]);
    These legend files are created by another application and don't include an extension.
    I cannot ask the user to rename the files prior to upload, I cannot change the output of the other application and I do want to filter to prevent selection of incompatible files as much as possible.
    Flex 4.6, Windows 7

    Would that be:
    new FileFilter("Legende", "null")
    or
    new FileFilter("Legende", null)
    If this is not correct, maybe you just use browse() without fileFilter,
    and then check the extension property of file() that selected from file browse

  • Files without extensions read as UNIX exe files

    I have an iMac connecting to my MacBook Pro that has several external drives attached by firewire. On those external drives the iMac sees any file without an extension as exe files. In particular, font files are seen this way.
    Can I add extension to the font files (most of them postscript type 2) so that the iMac sees them as fonts rather an exe files?
    Or is there a way of solving the problem that has a more broad approach?
    Thanks!!!

    First, ensure that Finder->Preferences->Advanced->Show all filename extensions is checked, then check those files. If the issue continues, then rebuild the LaunchServices database by running this one-line command in the Terminal.app (/Applications/Utilities/)—copy & paste it into the Terminal window and hit the return key:
    */System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchS ervices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user*
    Restart and see if that fixes the problem.

  • Batch export .ai to .png produces files without extension - please help

    I created an Action to batch export a folder of .ai files to create 300dpi .png's of the .ai file's artboard. I did this by simply recording "Export...as png" with my desired settings then Batch running the Action on desired folder of .ai files.  The files were successfully exported, the trouble is that the exported files lack a .png file extension. My intent is to take these PNG files and
    merge them into a single PDF using Acrobat Pro. Unfortunatly, without the .PNG extension, Acrobat Pro does not recognize the file types and does not let me use the Combine Files feature on them. Going back and manually adding a .png at the end of the exported files defeats the time-saving purpose of Batch Processing all together. Is there something I am missing or doing incorrectly? I have included screenshots of 1) My Batch Action settings 2) folders showing files without .png extension and 3) visual of what I see when I am trying to combine PNGs into a PDF. Assistance would be greatly appreciated!
    - Erin

    Yes, I am on a Mac running Snow Leopard 10.6.8 with CS5 (Illustrator 15.0.2, Acrobat Pro 9.4.6). Your suggestion did not help as "Hide Extension" is not checked. I even set "Open With" to Acrobat Pro and still get no extension or ability to import into Combine in Acrobat. Thanks anyhow. Please see below.

  • Files without extensions not recognizing program

    Recently I used my new lacie firewire drive to transfer files from my G4 to a PC laptop. Now the files on the Lacie (when I work on the G4) are missing their icons. Only files without the extension .ai, .m4a etc. Some files will open via right click and choose the program. Some will not open at all.
    In every folder there is now a finder.dat and resource.
    I read in a recent post about the finder.dat and resource. And now understand the relationship to the PC. This has never happened on my older Lacie drive which I've used between computers.
    Is there a repair program I can run on the Lacie?

    But for now is there a way to salvage the files that are
    gray rectangles. So that they can recognize the program
    from which they were created?
    First, you do get credit for using some method of backing up. Thats more than many users do
    If the files with generic icons were created on another Mac, and they will not open (or prompt you for a program to open), then you likely no longer have either an old copy of the program that created the file, or you do not have the OSX version of the program that created them, or both.
    Given they are from a G3, I would suspect they are looking for a Classic based program, not an OSX based program.
    First question: Is Classic installed on your new machine?
    If not, you may want to install it. Presuming your G3 was up to OS 9.2.2, you should be able to simply copy the System Folder (Os9), as well as the Applications (OS9) folder from the G3 to the external to the G4.
    Second question: Based on your folder structure, can you determine what program you originally used to create the file(s)?
    If the answer to question 2 is yes, then try opening that program (or the latest version thereof) first, then using it's open... command to open the file that you cannot 2x click.
    Once you successfully open the file in (whatever program), save the file. This should 'update' the file, change the icon, and make it 2x clickable from the finder.
    If the files with generic icons were created on the PC, then you will need the Mac equivalent of the program, or a program you know can open the file. For these files, once again open the application, then use it's open... command to get to the file.
    Keep in mind there may be some files you simply cannot open or run on the Mac. There are way too many to list, but some of the most common will be .MDB (MS Access),DLL,PIF,COM, EXE,CAB, & MSI.

  • Mac files without extension

    Hi Everyone,
    In our company environment, each user has a home drive (resides on SAN share) and they place a copy of their files on their home drive instead of local machine so that their files can be backed-up on routine bases.
    Now we have start encountering a problem, whenever a Mac user will copy a file (any files that does not have extension) on his home drive and then try to download back to his desktop then Mac machine will not recognize that file. This will only happen with those files does not have an extension. We are running Leopard and Tiger OS X on Macs
    Does anyone know how can I fix this issue?
    Thanks,

    The file extension is part of the file name, and it may be hidden by the Finder. The "Advanced" tab in the Finder preferences permits you to force the file extension part of the file name to be displayed. Otherwise the default is to hide the extension part of the file name unless you've explicitly asked Finder to display the extension for that particular file (select file, press command-I, and uncheck "Hide extension").
    OS X still stores a "Creator Code" and file type for each file in the system metadata (as described in my previous post). You can see these using Terminal, and the command 'mdls'. OS X 10.6 uses this information differently than previous versions. OS X 10.6 maintains the creator code, but now ignores it in deciding which application to use to open a file.
    The Finder (and the shell's "open" command) use the following criteria to decide what application to open a document with (stopping at the first one that fits):
    1. Did the user specify the application using the Finder? If so, use that.
    2. If the file has an extension in the name ('.' followed by a string that doesn't contain a '.'), and that extension is registered with LaunchServices, use the file type and default application registered with LaunchServices.
    3. If the file meta-data contains a 4-letter file type (kMDItemFSTypeCode) and that's registered with LaunchServices, use the default application that's registered.
    If the file type is selected by 2 or 3 and there are multiple applications that can work with those file types and the user hasn't specified a default, then check if the file has a creator code and use that as the default application (note that 10.6 no longer considers the creator code). If there's no creator match, give preference to OS X apps over Classic ones (10.6 no longer supports Classic apps). Give preference to apps on the boot volume over other volumes, and if there's two apps with different versions, give preference to the most recent.
    That said, your problem is specific to files that have no extension (so they aren't subject to the assignment of file type by extension). If OS X can't determine what type of file they are without the extension, then the meta-data that contains the file type and creator have been lost (you're posting to the Leopard discussion group, so the creator code is still relevant). This indicates that the meta-data has been lost or stripped in the process of being transferred to the network drive as I had described above.
    Note that you can programmatically restore the information, but the user can also manually assign the application used to open a file using the Finder.
    Were it me, I'd probably work on trying to figure out why the metadata is being lost and correct that first. You can remediate the problem with some Perl scripting, the 'file' command (which is a UNIX utility that determine's a file's type information by looking at the content of the file), and the SetFile utility (to manually set the creator and file type metadata).
    It should also be noted that if you've lost the file meta-data, you've lost the file resource fork -- if it had one. Using the resource fork for files is deprecated and hasn't been common since before the move to OS X, but it's still possible that you are using some older Classic apps that utilize that. If that's the case, you've lost that information.

  • Ftp get file without extension

    Hi
    I'm trying to use the sample code from http://blog.dbandbi.com/tag/ssis-script-task-check-if-file-exists-c/
    public void Main()
    string userName = Dts.Variables["User::userName"].Value.ToString();
    string password = Dts.Variables["User::password"].Value.ToString();
    string fileName = Dts.Variables["User::fileName"].Value.ToString();
    string ftpURL = String.Format("ftp://ftp.dbandbi.com/public_ftp/incoming/{0}",fileName);
    try
    FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(ftpURL);
    ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile;
    ftpRequest.Credentials = new NetworkCredential(userName, password);
    using (FtpWebResponse ftpResponse = (FtpWebResponse)ftpRequest.GetResponse())
    Dts.Variables["User::isFileExists"].Value = true;
    catch
    Dts.Variables["User::isFileExists"].Value = false;
    Dts.TaskResult = (int)ScriptResults.Success;
    but I'm having problems because the files are in unix format and they don't have extension. I  tried using filename*.* and filename*  but I always get "file does not exist".  What I'm trying to do is to know if the file created by
    another process has been freed so I can download it.
    thanks in advance
    cognosoft

    If no extension then check for the exact name. It must not matter. When you connect to the site using non SSIS facilities, do you see the file there? Wildcards do not work AFAIK.
    Basically, you need a directory listing to determine what files exist. You can run a remote dir command and save its output to a file or variable to skim thru.
    Arthur My Blog

  • Download File without displaying in browser window

    I'm trying to download a PDF file from a flash site without
    displaying the file in browser window. PDF file downloads correctly
    on a Mac with Safari without displaying in the browser, however it
    displays the PDF file in the browser window on a PC with IE 7.
    Have added a .htaccess file to server "AddType
    application/video/x-m4v .m4v .sit .zip .pdf" Can anyone tell me how
    to do this and a sample piece of code would be greatly appreciated.
    Thanks

    Ironically, when someone replies to my e-mails, which has my logo at the end (where I'm glad it shows), it also shows as an attachment in the header.
    'T'would be nice to have this feature on outgoing mail, as well as having the option to include an in-line graphic with the signature.
    I have written to http://www.apple.com/macosx/feedback/ with that suggestion.
    Thanks!
    Rick
    TiBook 867 MHz   Mac OS X (10.4.10)  

Maybe you are looking for

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in

  • How to remove VPF calculation on arrear

    Dear Experts, We have some retro wagetypes (2ADA,2AD1,2BAS,2BA1,2FDA,2PER,2SPP,2VDA)for basic components, on which PF and VPF calculation both are taking place. Now our client's requirement is to waive the VPF calculation on retro arrears payments. I

  • Mysql's auto_increment in berkeley db

    Hi, I am coming to BDB from MySQL. I am using C API to create my first example. Q: What would be the equivalent of MySQL's auto_increment field type in BDB ? I read the docs, and it says QUEUE access type will use immutable record numbers, does it me

  • Error code 1007F after file with question mark?!

    I have a 13 inch MacBook pro which is just over a year old. For the past week or so it hasnt been connecting to my university wifi network, eduroam. Then this morning, when it started up, I received a blank screen with a question mark flashing, which

  • Looking for a camera. . .

    I was interested in the Nikon p80 but after reading some reviews Im not sure if its what I want...heard its not for people who arent experienced with anything other than point and shoot cameras. This is what Im looking for, and reviews/advice would b