IE saves file in different name(ex. some[1].somthing.txt ) why adds [1]?

I am streaming the file content from servlet. My header & content type setting looks as follows.
String downloadType = "application/octet-stream";
res.setContentType(downloadType + "; name=\"" + fileName + "\"");
res.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\";");
When I click the link on the HTML page or if I right click and 'Save Target As' the file.
Actual file name = some.somthing.txt
but it saves As = some[1].somthing.txt
If the file name contains only one '.' then it saves as same name, the problem arises only if the file name has more than one 'dot'.
If any body has any idea please help me out..
Note: The directory I chose to download doesn't have any files by name
"some.somthing.txt" so it wasn't due to cache.

If the file name contains only one '.' then it saves
as same name, the problem arises only if the file name
has more than one 'dot'.I encourage you to read RFC1806 and its successors. Start
with RFC1806, '2.3 The Filename Parameter'. You should stick
with 8.3 filenames.

Similar Messages

  • Save file in different name

    How can I save the screenshot image in different names?
    Example:When button 1 is click save in screenshot1.jpg, then button 1 is click again save in screenshot2.jpg ......etc
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim bmpScreenshot As Bitmap = New Bitmap(Panel1.Width, Panel1.Height - 300, PixelFormat.Format32bppArgb)
    ' Create a graphics object from the bitmap
    Dim gfxScreenshot As Graphics = Graphics.FromImage(bmpScreenshot)
    ' Take screenshot of just the panel control
    gfxScreenshot.CopyFromScreen(Me.PointToScreen(Panel1.Location), New Point(0, 0), Panel1.Size, CopyPixelOperation.SourceCopy)
    ' Save the screenshot
    bmpScreenshot.Save("D:\screenshot.jpg", Imaging.ImageFormat.Jpeg)
    End Sub
    Thanks

    If you only want to number the images like ScreenShot_0000, ScreenShot_0001, and so on...  Then you can use a class scoped integer variable to number them like below.  Also, you can draw the panel directly to a Bitmap without using the CopyFromScreen
    method.
    Public Class Form1
    Private count As Integer = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim bmp As New Bitmap(Panel1.Width, Panel1.Height)
    Panel1.DrawToBitmap(bmp, New Rectangle(Point.Empty, Panel1.Size))
    Dim fn As String = "ScreenShot_" & count.ToString.PadLeft(4, "0"c) & ".jpg"
    Dim saveas As String = IO.Path.Combine("C:\TestFolder", fn)
    bmp.Save(saveas, Imaging.ImageFormat.Jpeg)
    count += 1
    End Sub
    End Class
     However, when you close your application and reopen it again it would start at ScreenShot_0000 again and would overwrite any images that are in that directory that have the same numbered names.  If you want it to automatically detect the last
    numbered file and start with the next number then you can use a While loop in the above code to avoid overwriting the existing images like this.
    Public Class Form1
    Private count As Integer = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim bmp As New Bitmap(Panel1.Width, Panel1.Height)
    Panel1.DrawToBitmap(bmp, New Rectangle(Point.Empty, Panel1.Size))
    Dim fn As String = "ScreenShot_" & count.ToString.PadLeft(4, "0"c) & ".jpg"
    Dim saveas As String = IO.Path.Combine("C:\TestFolder", fn)
    While IO.File.Exists(saveas)
    count += 1
    fn = "ScreenShot_" & count.ToString.PadLeft(4, "0"c) & ".jpg"
    saveas = IO.Path.Combine("C:\TestFolder", fn)
    End While
    bmp.Save(saveas, Imaging.ImageFormat.Jpeg)
    count += 1
    End Sub
    End Class
    If you say it can`t be done then i`ll try it
    Hi IronRazerz,
    Thanks for your solution. I would like to ask you question about open files and rename files, I know that there are out of the question in this thread but the only way I can get the answer through your solution.
    My problem is when I open files "ScreenShot_0000.jpg" and then when I want to rename files the file will rename  "ScreenShot_0001" instant of "ScreenShot_0000.jpg".
    How can I suppose to open and rename files follow by sequence without interrupt?
    Below codes are my modified codes to open and rename files.
    Public Class Form1
    Private count As Integer = 0
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    'rename files
    Dim fn As String = "C:\Users\hwai\Desktop\Capture\ScreenShot_" & count.ToString.PadLeft(4, "0"c) & ".jpg"
    Dim saveas As String = IO.Path.Combine("C:\Users\hwai\Desktop\Capture\", fn)
    My.Computer.FileSystem.RenameFile(saveas, "Rename_" & count.ToString.PadLeft(4, "0"c) & ".jpg")
    count += 1
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    'open files
    Dim fn As String = "C:\Users\hwai\Desktop\Capture\ScreenShot_" & count.ToString.PadLeft(4, "0"c) & ".jpg"
    Dim saveas As String = IO.Path.Combine("C:\Users\hwai\Desktop\Capture\", fn)
    Dim ps2 As Process = Process.Start(saveas)
    count += 1
    End Sub
    End Class
    Thanks

  • Save Task with Different name in workspace

    Hi,
    While using SAVE button in workspace, is there a way to save tasks with different names?
    steps:
          1) Click on start Process in workspace  - Complete task order
           2) Click on save button with some data.
                      - Is it possible to change the name here?
    if there are 50 tasks named "Complete task order" in To-do list, users want the ability to rename task.
    Any help is appreciated.
    Thanks,
    Krishna

    Hi,
    While using SAVE button in workspace, is there a way to save tasks with different names?
    steps:
          1) Click on start Process in workspace  - Complete task order
           2) Click on save button with some data.
                      - Is it possible to change the name here?
    if there are 50 tasks named "Complete task order" in To-do list, users want the ability to rename task.
    Any help is appreciated.
    Thanks,
    Krishna

  • I have been creating forms in InDesign and pulling into Acrobat XI Pro to do form fields. My client would like to fill in the PDF form, save under a different name locally on their device, and redistribute. The problem I have is that, sometimes, they want

    I have been creating forms in InDesign and pulling into Acrobat XI Pro to do form fields. My client would like to fill in the PDF form using Reader, save under a different name locally on their device, and redistribute. The problem I have is that, sometimes, they want to redistribute the form as Read Only. I know how to flatten the form on a mobile device, but uncertain how they can do that with a PC or Mac using Adobe Reader. I looked at FormsCentral thinking there might be a solution going that route, but don't believe there is. Any advice?

    FormsCentral won't help with flattening a form. You could set up the form in Acrobat so that the fields are set to read-only, using JavaScript. Not quite the same as flattening but it's the best Reader can do.
    Note that when Reader is used to e-sign a document, it gets flattened, but this won't be possible if you need to Reader-enable the form and under certain other conditions.

  • One file has different names

    I've never seen this before. A file has different names. See the get info: note the name at the top doesn't agree with the name & extension below. See the ls -l in the terminal as compared to the finder name.
    !http://farm3.static.flickr.com/2425/4042669881c9a9a0b767o.png!
    Robert

    Hi Robert, I've seen that a couple of times with Packages, I think it comes from them changing the Name of the APP but not in the Info.plist in the Package.
    My BJPrinterUtility.app is version 3.2.0 and has "BJPrinterUtility.app" in all places.

  • Save file as or save file in different folder

    I want to open a file then save it in a different predetermined folder with the same name or maybe with a different name, is there a save or save as... action?
    I also want to sometimes create a new folder then rename it based on the name of the original file. Can't find that either. But I'm totally new at this.
    I'm getting stumped by both of these.
    Thanks,
    Automator newbie trying to convert 3d files to other format 3d files.
    Automator is so cool if I can get it to work.

    When using variables, the input items for the various Automator actions can be looked at like a stack of cards. You can do stuff with the stack you have, or set it aside to do stuff with a different stack and get the original stack back later.
    The following is an example that creates a folder from the name of a file, then copies the file there.
    1) *Ask for FInder Items* -- just get a single file
    2) *Set Value of Variable* { Variable: _Original Item_ } -- save it for later
    3) *Get Names of Finder Items* { Name: Basename only } -- get the name for the folder
    4) *Set Value of Variable* { Variable: _Item Name_ } -- save for use with the *New Folder* action
    5) *Get Value of Variable* { Variable: _Original Item_ } (Ignore Input) -- get the file back
    6) *New Folder* { Name: _drag Item Name variable here_ Where: wherever } -- create & copy
    Note that this workflow takes advantage of the fact that if items are passed to the *New Folder* action, it will copy them to the newly created folder.
    Since there isn't a way to loop a workflow other than the whole thing, to handle multiple items you would need to use an action such as the *Dispense Items Incrementally* action from http://automator.us/leopard/downloads/. The action will take your original input items and dispense them one at a time each time the workflow loops.

  • Problem saving files with different name with DFS installed

    I have a server that I have DFS installed and running on. This appears to work fine. There is one problem that I have encountered though:
    On a share I have a folder that is not inheriting rights from it parent object. This works fine with DFS. When I create a new word document and try to save it in this folder with a different name other than the default (doc1.doc) I get an error saying that the user doesn't have permission, but I can save it as the default name of doc1.doc. I can then re-name the file to what I want from windows explorer, open it up in word, work on it and save it again. Even with the new file name I can't do a save-as and save it as a different file.
    All the other folders under the share that inherit rights from the parent folder work.
    eg save-as in \\server\share\folder or below works
    save-as it in \\server\share\no_inheritance or below does not work
    Anyone have any ideas?

    Originally Posted by ndean
    I have a server that I have DFS installed and running on. This appears to work fine. There is one problem that I have encountered though:
    On a share I have a folder that is not inheriting rights from it parent object. This works fine with DFS. When I create a new word document and try to save it in this folder with a different name other than the default (doc1.doc) I get an error saying that the user doesn't have permission, but I can save it as the default name of doc1.doc. I can then re-name the file to what I want from windows explorer, open it up in word, work on it and save it again. Even with the new file name I can't do a save-as and save it as a different file.
    All the other folders under the share that inherit rights from the parent folder work.
    eg save-as in \\server\share\folder or below works
    save-as it in \\server\share\no_inheritance or below does not work
    Anyone have any ideas?
    I have the same problem... how did you solve it?
    Thanks!
    Andres, Blogger

  • SAVEAS FILE WITH OTHER NAME

    HI
    I'm trying to create a script to save a file that is already open in the same directory with a different name.
    Example: nome_0000_art to nome_0000_closed
    I tried to create from another script that saves EPS but as I am new to the subject could not make it work
    Could anyone help me, how do I perform the command saveas automatically without showing the dialog window by changing the file name?

    WORKED PERFECTLY!!!
    My script was well
    >>>>>>>>>>>>>>>>
    #target illustrator
    var sourceDoc = app.activeDocument;
    var sourceName = sourceDoc.name;
    var sourceDoc_Path = File(sourceDoc.path);
    var substituir_sourceName = sourceName.replace (/ARTE\..{2,4}$/,'DIGITAL.ai');
    var substituir_Path = sourceDoc_Path+"/" + substituir_sourceName;
    alert("sourceName: "+sourceName+"\nsourceDoc_Path: "+sourceDoc_Path+"\nsubstituir_Path: "+substituir_Path);
    function exportFileToAI (dest) {
        if ( app.documents.length > 0 ) {
            var saveOptions = new IllustratorSaveOptions();
            var ai8Doc = new File(dest);
            saveOptions.compatibility = Compatibility.ILLUSTRATOR16;
            saveOptions.flattenOutput = OutputFlattening.PRESERVEAPPEARANCE;
            app.activeDocument.saveAs( ai8Doc, saveOptions );
    var destFilePath = substituir_Path;
    exportFileToAI (destFilePath);
    <<<<<<<<<<<<<<<<<<<<
    Thanks!!!

  • How to read multiple files of different name using single file adapter

    There are two inbound locations inbound1 and inbound2 , and the files structure present in these two inbound locations are same but the files start with different names example
    (1)files in inbound1 starts with file1,file2...
    (2)files in inbound2 starts with abc1,abc2...
    by using same file adapter with read option how can i read both files....

    Hi K.A.N.N.,
    You can define multiple directories using the above link in 11g and poll for the file as \*.*.
    Alternatively you can use the Synchronous Read and specify the file name at runtime.
    You can also use Pick activity to define multiple branches each with a File Adapter to read from a specified location with specified file name. Although it would contain multiple Adapter Definitions at Development-time, only one of the Adapters will execute at Run-Time.
    Regards,
    Neeraj Sehgal

  • Picking file with different names

    Hi Experts,
        I am doing file to file scenario without IR.I am just picking up the files from sap appl server  and placing in third party server.
    my question is i having ten files different names.so i haev to pick up all the files.i can not put the * in file name scheme as it has different file in the same folder which should not picked ip.
    so how is is possible in file adapter do i need to create 10 different channels for 10 different file or any other way is there.
    Thanks,
    Bhaskar

    Hi,
    If you dont want any file to be picked by sender file adapter use the Exclusion mask in it.
    Go to advance selection for source file
    Refer http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards
    suraj
    Edited by: S.R.Suraj on Aug 11, 2009 6:34 AM

  • Look for files with different names

    Do we have any utility or command in solaris 8 where we can check for files in two folders with different names and display them somewhere? Manual search for such files becomes very difficult when there are a large number of files in the folders. Please suggest.

    Check with an Unix forum like http://www.unix.com

  • Batch Rename Multiple files with different names

    Hi,
    Is there any way to batch rename multiple files with individual names? I.e
    IMG_123 changed to  RSP45AS
    IMG_124 changed to MOL157A
    IMG_125 changed to AGKH135
    IMG_126 changed to MNOLH13
    IMG_127 changed to ASFBLUG
    Etc.
    Are they any programs or scripts or plug ins that would do that job?
    Thanks

    HI there Onemorewave,
    It looks like there is a batch remname feature included in OS X 10.10 Yosimte if you are planing on updating. 
    Rename files, folders, and disks - Mac Help
    Rename multiple items
    Select the items, then Control-click one of them.
    In the shortcut menu, select Rename Items.
    In the pop-up menu below Rename Folder Items, choose to replace text in the names, add text to the names, or change the name format.
    Replace text: Enter the text you want to remove in the Find field, then enter the text you want to add in the “Replace with” field.
    Add text: Enter the text to you want to add in the field, then choose to add the text before or after the current name.
    Format: Choose a name format for the files, then choose to put the index, counter, or date before or after the name. Enter a name in the Custom Format field, then enter the number you want to start with.
    Click Rename.
    Note: To batch rename, you would want to choose the "Format" option.
    -Griff W

  • CS5, checked "save file extensions as small case letters" but still capital, why?

    hi,
    i installed CS5 4 weeks ago, since this time, i never got a file extension in small case letters, only capital letters ( xxx.TIF ). why?
    i checked it in preferences, see enclosed screenshot... i never had this problem in CS4.
    it would be important for myself, when saving files, that alle extensions are small case letters, like xxx.psd or xxx.eps
    usually i rename these extensions manually, cause i am uploading final images to PC servers, which
    cant recognize capital letters, i presume....

    no, i am still dealing with this problem on both macs,
    mac pro mid 2010 2,8 quad (24GB RAM) and my mbp 15" i7 (4GB RAM)
    where i installed Photoshop CS5.
    on both macs, photoshop always saves files with capital letter file extensions (xxx.TIF or xxx.PSD)
    thats very annoying, as i have to manually rename the file in the finder later.
    and thats for all files i create.
    i really wonder, could anyone from the adobe staff please comment if it is a bug
    or anything else?
    thanks!

  • How to deploy ear file with jar file and war file with different names

    Hi,
    As part of weblogic migration from WL 6.1 sp3 to WL 10, Iam facing some problem.
    Problem:
    I have one ear file(abc.ear) to deploy which contains one jar file(xyz.jar) and one war file(pqr.war).
    In config.xml file of WL 6.1, it was mentioned as :
    <Application Deployed="true" Name="abc" Path="./config/mydomain/applications/abc.ear">
    <EJBComponent Name="xyz" Targets="myserver" URI="xyz.jar"/>
    <WebAppComponent Name="pqr" Targets="myserver" URI="pqr.war"/>
    </Application>.
    The above is working fine.
    But in config.xml file WL10,I cannot mention the same.
    I need to have different application anmes for ear,jar and war.If I deploy as a ear file,the jar and war files are deployed with the same ear file name.
    I tried the following options:
    1) Deploying as a ear file by adding <sub-deployments>
    2) Deploying both war and jar seperately which is not recommended in my application.
    Please provide the content I should place in the config.xml so that everything works fine correctly.
    Any help is appreciated.

    Hi,
    As part of weblogic migration from WL 6.1 sp3 to WL 10, Iam facing some problem.
    Problem:
    I have one ear file(abc.ear) to deploy which contains one jar file(xyz.jar) and one war file(pqr.war).
    In config.xml file of WL 6.1, it was mentioned as :
    <Application Deployed="true" Name="abc" Path="./config/mydomain/applications/abc.ear">
    <EJBComponent Name="xyz" Targets="myserver" URI="xyz.jar"/>
    <WebAppComponent Name="pqr" Targets="myserver" URI="pqr.war"/>
    </Application>.
    The above is working fine.
    But in config.xml file WL10,I cannot mention the same.
    I need to have different application anmes for ear,jar and war.If I deploy as a ear file,the jar and war files are deployed with the same ear file name.
    I tried the following options:
    1) Deploying as a ear file by adding <sub-deployments>
    2) Deploying both war and jar seperately which is not recommended in my application.
    Please provide the content I should place in the config.xml so that everything works fine correctly.
    Any help is appreciated.

  • Crertifiacte download in Safari Browser saves file with CGI name

    We need to download user certificate in FireFox and Safari browsers as a multiple MIME message.
    ---- Sample MIME message template - START ----
    Content-Type: multipart/mixed; boundary="ABABABABABAB"
    --ABABABABABAB
    Content-type: application/x-x509-user-cert
    <cert_blob binary here>
    --ABABABABABAB
    Content-Type:text/html
    <HTML content here>
    --ABABABABABAB--
    ---- Sample MIME message template - START ----
    In FireFox the certificate gets downloaded and installed properly.
    In an ideal world BROWSER should handle "Content-Type:
    application/x-x509-user-cert". Browser should recognize that a user
    certificate is being downloaded and provide steps for user to install.
    But Safari browser prompts user to save the file, where filename is same as the CGI. If you choose “Download”, you will be prompted to install certificate into KeyChain. Displaying the filename as CGI is bit odd and confuses end user.
    How this can be fixed. Why the end user experience is different than Firefox.
    Filename can be changed by using Content-Disposition: HTTP header, but then it would require to have different pages for Safari and Firefox.
    Any input is appreciated.
    Thanks

    hi..
    1. yes i am able to log the file name properly on the server side. Whatever name i use, in whatever language, its showing correctly on server logs.
    2. the content of the file is variable with japanese, english or any other language
    3. in firefox, the name is converted to ascii characters... a combination of asterix, underscores, letters and others.
    4 No i am not getting an exception.....the file isdownloaded with the kindof name i mentioned in above point but the contents are intact. So the contents of file really dont matter in this case. its only the name that is giving a problem.
    I found a solution which was by modifying the content-disposition field of the header. For firefox, it should be something like
    response.setHeader("Content-Disposition", "attachment;filename*=UTF-8''%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0.");
    where the numbers are the hex representation of the filename in bytes. ie
    byte[] utfName = filename.getBytes("utf-8");
    String nameToSend = /*Hex represenation of utfName with each hex character appended by % */
    This method is working in firefox but not IE. Now i need to get this sorted on that.
    ny help...

Maybe you are looking for

  • Error of measurement and its propagation

    This is merely a hint to developers of LabVIEW: The "waveform" data accepts some variant additional information that is generally rarely used (e.g. not any graph shows NI_UnitDescription strings). It would be a good idea to have some sort of "error o

  • Report doesnot output xml

    Hi All, We have resently upgraded from Oracle EBS 11i10 to Release 12 (Linux SLES 10). The standard report "Printed Purchase Order Report (Portrait)" runs fine when the output format is "Text" but errors out when it "XML". The report runs fine for mo

  • How do I fix quality of photos in iMovie from iPhoto?

    I am a first time poster here and I'm not very technical with computers but if someone could please explain this to me simply I'd be very appreciative. When trying to make a slideshow from pictures I took, with all the effects and such in iMovie, I'm

  • Delivery Split of BOM components

    Hi all, What can be the reason why when sales bom were delivered, the header and its components splits up... Thanks

  • Why is this happening?

    New user here... beware... I started an empty LE8 project. I browsed to an MP3 that I wanted to add tracks around. I drug the MP3 in place and an audio track was created for it just fine. I then hit the + and added a software instrument track. I want