Path+filename in download

Hello !
i have problems with my download and hope that somebody can help me.
CACHED_RESPONSE->SET_HEADER_FIELD( NAME  = 'Content-Disposition'
                            VALUE = DL_PATHFILE ).
if dl_pathfile is 'bv.txt' the download popup shows the filename bv.txt - so far so good.
but i also want the pathname to be suggested by the download-popup.
but if i set dl_pathfile to 'p:\EigeneDateien\BV\bv.txt' the popup shows filename = cached file.
i also tried
p:\...
Thanks a lot for your help
Helmut

it will always point to the last opened directory.
as per the linked sample, this can be changed on the fly by modifying some registry entry, but i guess its not a safe method.
just for your knowledge you can check this , its for vb application.
http://vbnet.mvps.org/index.html?code/internet/dofiledownloadcustom.htm
Regards
Raja

Similar Messages

  • Variable path for up/downloading file

    Hi,
    i´ve developed a report that reads a file from a folder (input folder), then processes the data and finally deletes this file (from input folder) and downloads it to a new folder (output folder).
    If user decides to use a new path for up/download how can i control this new situation? via a table storing different paths?
    Any suggestion will be welcomed.
    Best regards.

    Hi everyone,
    you're right, I've faced this issue several times before, and this is how I achieved it:
    * Selection-screen
    PARAMETERS: p_fileup LIKE rlgrap-filename OBLIGATORY,
                p_filedn LIKE rlgrap-filename OBLIGATORY.
    * Events
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fileup.
      PERFORM f4_fichero USING p_fileup.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filedn.
      PERFORM f4_fichero USING p_filedn.
    * Main program
    START-OF-SELECTION.
      PERFORM carga_fichero.
    *... further processing
      PERFORM descarga_fichero_errores.
    * Routines
    *&      Form  f4_fichero
    *       text
    *      -->_FILE  text
    FORM f4_fichero USING _file.
      DATA: l_subrc TYPE n.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    *   EXPORTING
    *     PROGRAM_NAME        = sy-cprog
    *     DYNPRO_NUMBER       = sy-dynnr
    *     FIELD_NAME          = ' '
    *     STATIC              = ' '
    *     MASK                = ' '
        CHANGING
          file_name           = _file
        EXCEPTIONS
          mask_too_long       = 1
          error_message       = 2
          OTHERS              = 3.
      IF sy-subrc <> 0.
        l_subrc = sy-subrc.
        MESSAGE e000(zf)
          WITH 'Error en función'(200)
               'KD_GET_FILENAME_ON_F4'
               'SY-SUBRC:'(201)
               l_subrc.
      ENDIF.
    ENDFORM.                    " f4_fichero
    *&      Form  carga_fichero
    *       text
    FORM carga_fichero.
      DATA: l_subrc TYPE n.
      DATA: l_filename TYPE string.
      l_filename = p_fileup.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = l_filename
          filetype                      = 'ASC'
          has_field_separator           = c_yes
    *     HEADER_LENGTH                 = 0
    *     READ_BY_LINE                  = 'X'
    *   IMPORTING
    *     FILELENGTH                    =
    *     HEADER                        =
        TABLES
          data_tab                      = t_fichero
        EXCEPTIONS
          file_open_error               = 1
          file_read_error               = 2
          no_batch                      = 3
          gui_refuse_filetransfer       = 4
          invalid_type                  = 5
          no_authority                  = 6
          unknown_error                 = 7
          bad_data_format               = 8
          header_not_allowed            = 9
          separator_not_allowed         = 10
          header_too_long               = 11
          unknown_dp_error              = 12
          access_denied                 = 13
          dp_out_of_memory              = 14
          disk_full                     = 15
          dp_timeout                    = 16
          error_message                 = 17
          OTHERS                        = 18.
      IF sy-subrc <> 0.
        l_subrc = sy-subrc.
        MESSAGE e000(zf)
          WITH 'Error en función'(200)
               'GUI_UPLOAD'
               'SY-SUBRC:'(201)
               l_subrc.
      ENDIF.
    ENDFORM.                    " carga_fichero
    *&      Form  descarga_fichero_errores
    *       text
    FORM descarga_fichero_errores.
      DATA: l_subrc TYPE n.
      DATA: l_filename TYPE string.
      DATA: lt_fichero LIKE e_fichero_entrada OCCURS 200 WITH HEADER LINE.
      l_filename = p_filedn.
      LOOP AT t_fichero WHERE NOT xerror IS initial.
        CLEAR: lt_fichero.
        MOVE-CORRESPONDING t_fichero TO lt_fichero.
        APPEND lt_fichero.
      ENDLOOP.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
    *     BIN_FILESIZE                  =
          filename                      = l_filename
          filetype                      = 'ASC'
    *     APPEND                        = ' '
          write_field_separator         = c_yes
    *     HEADER                        = '00'
    *     TRUNC_TRAILING_BLANKS         = ' '
    *     WRITE_LF                      = 'X'
    *     COL_SELECT                    = ' '
    *     COL_SELECT_MASK               = ' '
    *   IMPORTING
    *     FILELENGTH                    =
        TABLES
          data_tab                      = lt_fichero
        EXCEPTIONS
          file_write_error              = 1
          no_batch                      = 2
          gui_refuse_filetransfer       = 3
          invalid_type                  = 4
          no_authority                  = 5
          unknown_error                 = 6
          header_not_allowed            = 7
          separator_not_allowed         = 8
          filesize_not_allowed          = 9
          header_too_long               = 10
          dp_error_create               = 11
          dp_error_send                 = 12
          dp_error_write                = 13
          unknown_dp_error              = 14
          access_denied                 = 15
          dp_out_of_memory              = 16
          disk_full                     = 17
          dp_timeout                    = 18
          file_not_found                = 19
          dataprovider_exception        = 20
          control_flush_error           = 21
          error_message                 = 22
          OTHERS                        = 23.
      IF sy-subrc <> 0.
        l_subrc = sy-subrc.
        MESSAGE e000(zf)
          WITH 'Error en función'(200)
               'GUI_DOWNLOAD'
               'SY-SUBRC:'(201)
               l_subrc.
      ENDIF.
    ENDFORM.                    " descarga_fichero_errores
    The thing is, I ask for 2 paths: input file and error in output file. Then I code some f4* routines. Then I upload the input file (f4_carga_fichero), do the processing, and finally I loop at the records with error and download these records via form descarga_fichero_errores.
    I hope it helps. BR,
    Alvaro
    PS: Pablo->Forza Atleti!

  • Using a Variable to Substitute the path\filename of a Batch file in the Start_Process Command

    I am trying to write a script that will execute a batch file on a remote Windows server.
    This line below is basically what I'm trying to do and it works without error, however I would like to use a variable for the path\filename of the batch file.
    invoke-command -computername QSC-A-ICE01 -scriptblock {Start-Process "\\qsc-a-ice01\D$\Test\RunThis.bat" }
    If I try to use a variable as in this example below I receive the error below. The error seems to indicate it's it expecting a "FilePath" parameter. Is this true? How would I change this script to make it work when substituting a variable.
    $MyProcess =  "\\qsc-a-ice01\D$\Test\RunThis.bat"
    Write-Host $MyProcess
    invoke-command -computername QSC-A-ICE01 -scriptblock {Start-Process "$MyProcess"}
    This is the error text I receive when using a variable:
     PS C:\Windows\system32> D:\Test\ThisWorks.ps1
    \\qsc-a-ice01\D$\Test\RunThis.bat
    Cannot validate argument on parameter 'FilePath'. The argument is null or empty. Supply an argument that is not null or
    empty and then try the command again.
        + CategoryInfo          : InvalidData: (:) [Start-Process], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.StartProcessCommand
        + PSComputerName        : QSC-A-ICE01
    PS C:\Windows\system32>

    Mike,
    Thanks for providing the link, it was very informative. The link described how to use the args in a ScriptBlock and provided me with an explaination as to why it works the way it does on a remote server. This is my 1st post to the forum and I don't know
    how the points system works yet.
    I would like to split the points , but I don't see that this is possible.
    You're very welcome, I'm glad that the information was helpful.
    You can mark as many posts as answers as you'd like, there's not a restriction on only having a single answer per thread. You certainly don't have to though, David's answer is more than sufficient to help any future people who find this thread.
    Also, on a side note, you may want to post in the thread below. Posting there will get your account verified so you'll be able to post links and images.
    http://social.technet.microsoft.com/Forums/en-US/200c33c9-abe9-494a-953a-bf53fccb3c76/verify-your-account-11?forum=reportabug
    (Future people - don't use that link.
    Click here and look for the current thread as a sticky.)
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • How to set the filename when downloading a file?

    I'm working on mvc4. I have generated excel file dynamically using following simple code my hosting is on Azure
    I have created a Root path and then try to save that excel file.
    Problem is when my Action Result method response comes back it is giving default popup to open a file but file name is having a GUID instead my provided file name
    What id wrong any clue?
    Excel file generation code:
    Microsoft.Office.Interop.Excel.Application xlApp =
    new Microsoft.Office.Interop.Excel.Application();
    return tempPath;
    This method returns something like C:\AppData\Local\dftmp\Resources\11a2435c-998c-4fe8-aa55-8bb42455b4ca\directory\myexcelFILE.xls.
    The Download File popup does not give file name as myexcelFILE.xls it gives some GUID why so?
    Action
    Result method code
    public ActionResult DownloadExcel(){
    string path = ExcelGenerationCode(fileName);
    Stream s = new FileStream(path, FileMode.Open, FileAccess.Read);
    return new FileStreamResult(s, "application/vnd.ms-excel");
    Ashish Fugat (ashuthinksatgmail.com) SE

    http://forums.asp.net/
    The above forum has the MVC section.

  • Safari corrupts filenames of downloads. Help me?

    Safari alters filenames when I download certain files. It has this unwelcome habit of appending .txt to the names of these files.
    I use the Mac to download a lot of files for transfer to my PC. Whenever the filename ends in .rar, .ace, or .7z (and maybe others) the additional extension, .txt is appended.
    Naturally, it's necessary that I remove this addition. To add insult to injury, OSX tosses up a dialog asking for a decision as to whether I really want to use the original extension or leave .txt in place.
    I would like to stop the original change and I would also like to stop OSX from throwing up this annoying dialog.
    Any ideas? There just must be a fix for both these actions. If I have to resort to the use of the console, please provide full info as I am unfamiliar with the console.
    PMG5 2x2.5 +30 Cinema   Mac OS X (10.4.6)  
    PMG5 2x2.5 +30 Cinema   Mac OS X (10.4.6)  

    One solution in Safari appears to be to right-click (control-click?) on a link to a file then choose 'download linked file'.
    Unfortunately, this often results in a download folder full of .html files because there's often a convoluted path through many servers to get access to the wanted file. This is especially evident when seeking files to use on a Winbox.
    It's still easier to remove the unwanted extension after the fact. Or use Firefox.
    Because I need to grab a lot of compressed Windows file packages using my Mac, Safari is becoming a huge pain in the neck.
    A search of Apple/Support/Discussions/Safari reveals that thousands of users are being annoyed with this behaviour. I think I'll have to use Apple's feedback system to complain about this, add my whinge to the list.
    You know, it would make some sense for Safari to add an extension if the function was used properly. But it seems that Safari has this list of registered file types and if the file of interest is not in it's list, Safari makes a guess and adds a random value. Safari's default should be that if a filetype is not recognised, to take no action. Absolutely logical, but seemingly, not to Apple's devs.

  • Inserting file path/filename

    Hi, all out there,
    I've just strated using Pages '08, and exploring it. But Pages Help and User Guide do not tell me how to insert the file path or filename in the footer, so that it's automatically updated whenever changed. It's not in the Insert menu, and cannot find it in Insert > Function.

    Hi Peggy,
    Though that feature is useful isn't found in 10.4.10. The Devon Technologies WordService ReadMe file has the following:
    Insert:
    Contents Of Path
    Inserts files and folders of the selected path (tilde is expanded)
    and of all its subdirectories (e.g. select the path '~/' and this function
    will insert all contents of your home directory)
    Short Date Cmd-'{'
    Inserts the current date (no text selection necessary)
    Long Date Cmd-'}'
    Inserts the current date (no text selection necessary)
    Short Date & Time Cmd-'_'
    Insert the current date & time (no text selection necessary) Long Date & Time Cmd-'%'
    Insert the current date & time (no text selection necessary) Time
    Insert the current time (no text selection necessary)
    Maybe that's what you're seeing in your services menu perhaps.
    Sincerely,
    RicD

  • Unicode filename in download box

    I need to upload/download files with Unicode names from a file hosting service. Every thing is going fine except one thing - internet explorer.
    The problem is that IE doesn't recognize the file name i'm sending as Unicode - showing me an encoded string instead in the download box. The page displays the file name okay however the download box doesn't. The problem happens only if the unicode file name has no extension. With an ascii extension, the file displays fine. With a unicode extension, the name part appears correct but then the extension itself is garbled. Firefox works like a charm.
    What I'm basically doing, is that I check for the browser. If IE, I encode the filename and set the content-disposition header and stuff. If firefox, do it the firefox way (mark the filename field in the content-disposition with a * just before the equal sign). I then send the file data into a servlet output stream.
    As a temporary solution, I'm appending a .NoExtension extension to extention-less filenames. This has to do for now, unless any body here has a better idea...
    please? : ]

    Take a look at this article:
    http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/index.html

  • How do I set Safari to prompt me to choose a filename when downloading?

    I can't figure this out at all. How do I set Safari to give me a dialog box in which I can choose my own filename when downloadiing a file? Right now, as soon as I click "download linked file" it just puts the files straight on my desktop with whatever filename was assigned to it.
    This will help me identify files as I often download files saved with numerical names.

    Greeting Marco,
    This KBase article should help:
    http://docs.info.apple.com/article.html?artnum=301465

  • Changing filename when downloading generated file

    The scenario:
    There is a list of files that logged in users are able to download. The files themselves are not kept within the web root, as we need to be able to ensure that a user has rights to download the file. To do this I have created a JSP page which (a) checks that the user is logged and has appropriate permissions, (b) sets the content type to something the browser does not understand (to ensure the file, which is basically just text is downloaded instead of just displayed in the browser) and (c) gets and includes the content of the file using java.io.File.
    The problem:
    ... with this approach is that it uses a link which looks something like thefile.snd. This means that the file name in the save dialogue always defaults to 'getfile.jsp', when it needs to default to 'thefile.snd'.
    Any ideas? I've considered using an signed applet to do the download and rename the file but would like to avoid this if possible (although if anyone has the source for such an applet that would also be helpful).

    Thanks for the post clem. FYI, I had a similar problem but my data was coming from a database - not a file on disk. At first, setting the content-disposition wasn't working. Then I removed the "file; " part and left just
    response.setHeader("Content-Disposition","filename="+filename);
    and it worked.

  • I try and save a photo (from Path) and it downloads but does not download (save) in iPhoto. The iPad I am using is new, I could perform this task on my old iPad. Why the difference?

    I cannot save a photo on my new iPad (from Path) to iPhoto. The phot appears to download but then does not appear in iPhoto. I can perform the same task with my old iPad. I can also save an emailed photo to iPhoto. Thanks

    Right click on the photo in Safari and use the add photo to iPhoto option - if that is not there then your only choice is to save to disk and then import to iPhoto
    LN

  • Diskuse.exe crashes when path & filename is longer than 255 chars

    Hi All,
    I am trying to use diskuse.exe v1.3 from Win2003 Reskit to report over 1TB of data. My problem is that diskuse crashes and does not complete. Just before the crash I get an error:
    WARNING: Could not get SID for g:\personalfolders\adodds\my personal data\CML late relapse\Outcome of Second Allogeneic Transplants Using Reduced Intensity Conditioning Following Relapse after an Initial Allogeneic Transplant. -- Shaw et al. 108 (11)_ 3660 -- ASH Annual Meeting Abstracts.pdf
    The path and filename is longer than 255 chars which I suspect is causing the crash.
    The command I am using is:
    diskuse.exe g:\personalfolders /s /t /e:diskuse_errors.txt /f:diskuse_g.csv /q
    Note I dont really care if some directories/files get missed in reporting if there are errors, I just want diskuse to continue and give me its best effort.
    I assume this us a bug.. has anyone come across it before? any solutions or workarounds?
    Late addition to the above issue...
    If I run diskuse on my XP workstation against the same volume I get a drwatson error. The error codes are:
    EventType : BEX     P1 : diskuse.exe     P2 : 0.0.0.0     P3 : 3ea0a0de    
    P4 : unknown     P5 : 0.0.0.0     P6 : 00000000     P7 : 00000000    
    P8 : c0000409     P9 : 00000000     \

    Hi Gelliott,
    We deeply understand your concern and we are sorry for the inconvenience to you.
    As Microsoft continues to collect product feedback from the online ContactUs form for the product development groups, you could send your feedback to them.
    Here are the channels:
    Submitting suggestions for product enhancement:
    Legitimate Wishes fit into the following guidelines:
    • Enhancement or feature addition to existing Microsoft products
    • Reproducible problem or bug with current version that needs resolution
    • Cannot find documentation of feature within the help files
    • Difficulty using the product
    • All beta products
    • Product packaging complaints
    • Added accessibility feature for a Microsoft product
    These can be submitted here:
    http://www.microsoft.com/usability/enroll.mspx
    Besides, as far as I know, there is no such a dedicated forum for Resource kit.
    Thanks for the understanding.
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Filename of downloaded Excel file

    I frequently download Excel files from a website that seems for the most part windows centric. These excel files have an extension of .xls, I can double click them to open, but when opened they just have the file name of WORKSHEET. If I rename the file in the finder the same thing happens. If I try to open the file in numbers I get something like
    <table border="1">
    <!-- <tr><td colspan = "15" valign="middle" align="center">Date: 8/1/2008</td></tr>-->
    <!-- <tr><td colspan = "15" valign="middle" align="center">Investor's Business Daily Æ</td></tr> -->
    <tr><td colspan = "15" valign="middle" align="center">Investor's Business Daily 100</td></tr>
    <tr><td colspan = "15" valign="middle" align="center">Data as of 8/1/2008 market close</td></tr>
    Any idea? Now I have to open the file in excel, then do a save as, type in the file name (if I don't want WORKBOOK), then delete (or write over) the original file. What can I tell the website people?

    Hello ,
    In my procedure i am passing id and with the help of that id , ia am fetching values from the database.
    i have declared on clob type variable say v_insert where i am storing table structure(like worksheet) which i need on excel
    example
    v_insert := v_insert||'<tr>';
            v_insert := v_insert||'<td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td><b>Column1_Value</b></td> <td>abc</td>';
        v_insert := v_insert||'</tr>';then i am converting that clob into blob and storing the content into BLOB type variable say v_blob
    below is the code used for downloding the blob content.
    wpg_docload.download_file(v_blob);Thanks,
    Jitendra

  • Using local file links like file://n:/path/filename.txt in Announcements does not work

    Hi all,
    I would like to use the SharePoint 2013 announcement web part for our company intranet. Basically this works fine. Now and then we have the need to include local file links into the body of the announcement, e.g. "Read this new Version of
    file x: link". When creating a new announcement I can insert a link like this:
    file:///n:/path/file.docx or similar.
    But as soon as I save the new announcement, the link is gone (href part is removed from the anchor).
    Is this behaviour per design? Can I change it to allow local file links inside of list columns?
    Thanks for your help,
    Nothi

    Hi Nothi,
    We can go to that particular existing announcement list(e.g. mine is Announcement1)->list settings page.
    1. then make sure the option "Allow management of content types? " is enabled from Advanced settings.
    2. then click "Annoucement" content type link (like image below).
    3. then click "Body" column link.
    4. then click "Edit column" link.
    5. then select "Rich text" option as above image showed, save the change.
    6. then you can test again in this particular announcement list, it should work.
    If you want make all announcement type lists could use link to network location in the furure, you can create a custom announcement content type with the Body column which has enabled this "Rich text" option, then use this
    custom announcement content type for those lists.
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Can I specify a filename upon download of an mp3 podcast?

    I would like to do this because many podcasts to which I subscribe have very generic names, such as "01 NPR_ 08-10-2007 Talk of the Natio.mp3". If I download multiple podcasts from same site, it is very hard to tell where to find which topic, so I would like to name the file something more descriptive at the point of initiating download.
    Please respond via email to rmc001( at )jefferson.edu.

    If you're using iTunes, no. If you're using another "podcatcher", you'd need to check the documentation for that app.

  • Full path and filename in wwv_flow_files after upload from UNC path in IE

    I have a page with a file browse item. After page submit I move the file from wwv_flow_files to another table.
    Normally the column wwv_flow_files.filename only contains the filename. However, when using IE9 and selecting a file from an UNC path the column contains the full path+filename.
    Does anybody have an idea what happens here?
    How can I make sure I only get the filename?
    Using Apex 4.02.007
    Edited by: Rene W. on Feb 28, 2013 6:39 AM

    Rene W. wrote:
    I have a page with a file browse item. After page submit I move the file from wwv_flow_files to another table.
    Normally the column wwv_flow_files.filename only contains the filename. However, when using IE9 and selecting a file from an UNC path the column contains the full path+filename.
    Does anybody have an idea what happens here?
    How can I make sure I only get the filename?For security/privacy reasons recent versions of browsers by default do not send local file path information from File Browse items to the server, nor expose the file path in the control's JavaScript methods. Firefox, Safari and Chrome only provide the filename. IE6 & IE7 still yield the path in Windows format. IE8+ and Opera have adopted an irritating approach of replacing the path with a wholly imaginary "C:\fakepath\"—and this monstrosity has sadly had to be enshrined in the HTML spec. A reasonably compatible way to strip the path in JS is provided there, or you should be able to do it fairly easily in PL/SQL when moving the file.
    The fact you are getting the full path suggests that the IE security config setting "Include local directory path when uploading files" (or IE9 equivalent) is used in your browser/environment to enable the path to be exposed in IE. This may be necessary to support dismal legacy applications. Consult whoever is responsible for browser security configuration at your site to see why/if this setting is necessary.

Maybe you are looking for