How to zip a folder containing subfolders with files and download the zip file in silverlght 4

private void hbtnDownloadReceipt_Click(object sender, RoutedEventArgs e)
           try
                string Docpath = "ClaimsDetails/" + "20tech" + "/" + PaymentAdviceUNo;
                string dd = "ClaimsDetails/";
                Uri uri = new Uri(Application.Current.Host.Source, "/" + Docpath);
                Uri uri1 = new Uri(Application.Current.Host.Source, "/" + dd);
                string path = uri.AbsoluteUri.ToString();
                path1 = uri1.AbsoluteUri.ToString();
                //HtmlPage.Window.Eval("window.open('" + path + "')");
            catch (Exception ex)
                ex.Data.Clear();
1) Here "path" is D:\\TL 24-12-2014 \\OfficeConnect_17_10\\OfficeConnect.Web\\ClaimsDetails\\20tech\\PaymentAdviceUNo.     
2) In path "PaymentAdviceUNo" is the folder containing subfolders which i want to zip.
Thanks in Advance.

Hi,
You can download a zip file like any files with the Webclient class, look at the details and examples in the msdn documentation for downloading content on demand it even talks about how to download and get a specific file from a zip archive.
http://msdn.microsoft.com/en-us/library/cc189021(VS.95).aspx
Besides,  if you want to list the files,you could check articles below:
http://blogs.msdn.com/b/blemmon/archive/2009/11/25/reading-zip-files-from-silverlight.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Zipping multple files and sending the Zipped folder to target location using Biztalk

    Hi all,
    I have requirement like
    Seperate Xml files will be coming as incoming message to Biztalk
    Biztalk need to send a zipped folder contining all these xml to target location
    any link or component i can use to meet this requiremant  plese help
    regards,
    Vineeth

    Create or use the publicly available custom component for unzipping the received message and for send use another component to replace all attachments of a multi-part message
    (multiple parts to multiple files to zip) for its zipped equivalent. If not multiple message use any zipping API to zip the multiple 
    files to zip file and send the zipped file in send port.
    BizTalk Pipeline Custom Component Message Unzippper
    Zip Files in a Custom Pipeline Component
    Multi-Part Message Attachments Zipper Pipeline Component
    BizTalk Multipart Message Attachments Zipper is a pipeline component
    List of custom Pipeline component you can use
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?

    I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?
    Facts:
    In moving to a new iMac, I copied the iPhoto library to an external HDD assuming that I would point the new iMac to the backed up iPhoto Library
    All worked fine when I pointed the new library but noticed that some folders contained aliases and not the original file. So when I attempt to open that photo it can't find it because the alias is pointing to another drive.
    I do have all original photos from a couple of external HDDs. In the folders titled, "Originals" (from older versions of iPhoto) and "Masters" (from current iPhoto)
    I'm thinking I can create a new folder and drop the original files and make that my new iPhoto library. Is there a better way to rebuild my library? I do not want to create any future aliases.
    Thanks in advance for any help!

    do you have a strongly recommended default "managed" library (the iPhoto preference to "copy imported items to the iPhoto library is in its checked state) or a referenced library - you have unchecked that option?
    It sounds like you have a referenced library and are now experiancing one of the very siginificant drawbacks of a referenced library and one of the many reasons they are strongly not recommended
    Also note that iPhoto '11 may use alises in the originals folder as part of the upgrade
    It is important that we understand exactly what you have and what is not sorking - what error messages you are getting
    You must NEVER make any changes of any sort to the structure of content of the iPhoto library - there are no user servicable parts in it  --  and you can not rebuild yoru librtary - only iPhoto ir iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  can rebuild a library unless you are a SQL programmer and understand the structure that iPhoto uses
    LN

  • How to upload a PDF file, zip it and download the zipped file?

    Hi Experts,
    I have a requirement to upload a PDF file, convert that to a ZIP file and download it. If anyone has worked on this requirement, can you please guide me on this? Thanks.
    Avi

    Here you go.  Hope it helps.
    REPORT  zrich_0004.
    DATA: lt_data TYPE TABLE OF x255.
    DATA: ls_data LIKE LINE OF lt_data.
    DATA: lv_zip_content TYPE xstring.
    DATA: lv_size  TYPE i.
    DATA: lv_filename TYPE string.
    DATA: lv_path TYPE string.
    DATA: lv_fullpath TYPE string.
    DATA: lt_filetab TYPE TABLE OF file_table.
    DATA: ls_filetab LIKE LINE OF lt_filetab.
    DATA: lv_rc TYPE sy-subrc.
    DATA: lv_content TYPE xstring.
    DATA: lo_zip TYPE REF TO cl_abap_zip.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_up TYPE string DEFAULT 'C:\upload.pdf' .
    PARAMETERS: p_down TYPE string DEFAULT 'C:\download.zip' .
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_up.
      REFRESH lt_filetab. CLEAR ls_filetab.
      cl_gui_frontend_services=>file_open_dialog(
          CHANGING
            file_table              = lt_filetab
            rc                      = lv_rc
        EXCEPTIONS
          OTHERS                  = 5 ).
      READ TABLE lt_filetab INTO ls_filetab INDEX 1.
      IF sy-subrc = 0.
        p_up = ls_filetab-filename.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_down.
      CLEAR: lv_filename, lv_path, lv_fullpath.
      cl_gui_frontend_services=>file_save_dialog(
         CHANGING
           filename             = lv_filename
           path                 = lv_path
           fullpath             = lv_fullpath
         EXCEPTIONS
           OTHERS               = 4 ).
      p_down = lv_fullpath.
    START-OF-SELECTION.
      CREATE OBJECT lo_zip.
    * Read the data as a string
      cl_gui_frontend_services=>gui_upload(
        EXPORTING
          filename                = p_up
          filetype                = 'BIN'
        IMPORTING
          filelength = lv_size
        CHANGING
          data_tab                = lt_data
        EXCEPTIONS
          OTHERS                  = 19 ).
    * convert binary to xstring
      CLEAR lv_content .
      CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
        EXPORTING
          input_length = lv_size
        IMPORTING
          buffer       = lv_content
        TABLES
          binary_tab   = lt_data
        EXCEPTIONS
          failed       = 1
          OTHERS       = 2.
    * Get the file name of the uploaded file
      DATA: lv_upfilename TYPE string.
      DATA: lv_tmp TYPE char1024.
      DATA: lv_tmp_file TYPE char1024.
      lv_tmp = p_up.
      CALL FUNCTION 'STRING_REVERSE'
        EXPORTING
          string  = lv_tmp
          lang    = sy-langu
        IMPORTING
          rstring = lv_tmp.
      SPLIT lv_tmp AT '\' INTO lv_tmp_file lv_tmp.
      CALL FUNCTION 'STRING_REVERSE'
        EXPORTING
          string  = lv_tmp_file
          lang    = sy-langu
        IMPORTING
          rstring = lv_tmp_file.
      lv_upfilename = lv_tmp_file.
    * add to zip file.
      lo_zip->add( name = lv_upfilename content = lv_content ).
      lv_zip_content   = lo_zip->save( ).
    * Conver the xstring content to binary
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer        = lv_zip_content
        IMPORTING
          output_length = lv_size
        TABLES
          binary_tab    = lt_data.
    * download
      cl_gui_frontend_services=>gui_download(
          EXPORTING
            bin_filesize = lv_size
            filename     = p_down
            filetype     = 'BIN'
          CHANGING
            data_tab     = lt_data
          EXCEPTIONS
            OTHERS       = 24 ).
    Regards,
    Rich Heilman

  • How can I import an Aperture Catalog into Lightroom and retain the RAW file as well as the files with the edits?

    I have several catalogs in Aperture that I would like to import to Lightroom 5 and I want to retain the original RAW files as well as the files with the edits.  How can I do this?

    Well, you can bring in the raw file (without edits), and you can bring in a rendered RGB file (e.g. jpeg or tiff) with edits baked in, but what you CAN'T do is bring in a raw file, with the non-destructive Aperture edits, and have Lr translate those Aperture edits into Lightroom edits.
    Put another way: no raw converter/editor can understand the edits of any other raw converter/editor. So, you have to work with a rendered version, and/or re-edit from scratch in a new raw converter/editor.
    PS - it would be feasible to write a rough translator which approximated raw edits in one world into edits in another, but such does not exist yet for Aperture -> Lightroom, that I know of.

  • How to FTP file and extract the zip file automatically?

    Hi,
    My app needs to FTP another site and also automatically unzip the transferred file over the internet by user clicking on one button. Any experts? thanks.

    How do you open a can of beans before you take it out of the pantry?
    However I suppose your question only sounded stupid like that, you didn't really mean it that way. One problem is that you didn't mention which way the transfer was going. I assume you are asking about getting a file and unzipping it? Many of the FTP clients described in the article that jmennen referred to allow you to get an InputStream that allows you to read bytes from the server. You would take this InputStream and wrap it in a ZipInputStream. That way you could unzip the file as you transfer it from the server, rather than having to use a temporary file between the two steps.
    But if you really meant that you wanted the unzipping to take place on the server before you did the download, no, you can't do that.

  • How can I get a preloader to launch a main (external) swf file, and have the main file remove the preloader once it's fully loaded?

    Using Flash MX, ActionScript 2:
    I’ve been struggling for several weeks, trying to get a preloader to work on a large (~80 MB) photo portfolio file (using the method where the preloader is on frame 1 of the file, and when loading is completed, it jumps to the content).  I’ve done countless tutorials, and none seem to work on my presentation.  I even tried downloading a trial version of CS4 so I could export every one of the file’s library movie clips and images so that they load on Frame 2 (a feature MX doesn’t have).  It takes about 20 seconds for the .exe to load from a CD, and no matter which preloader construction I use, it always seems to appear in the last few seconds before the movie loads completely.  During the initial wait time, there’s no indication that anything is happening:  no hourglass on the mouse, and not even a blank screen. This is only true for the first time that the file is loaded from the CD; on subsequent loads, the file must already be in RAM, because it loads within a few seconds. 
    I decided that I’m going to try and make the file which the user clicks on (one named Windows_Portfolio.exe or another called Mac_Portfolio.hqx) the preloader so that it would be tiny, and would load instantly.  I want that file to launch the external huge portfolio file (renamed files.swf), keep track of its loading progress, and cycle through a slideshow (10 thumbnail images that transition into each other over 100 frames) proportionally, based upon the percentage of files.swf that had been loaded.
    I assume that there should be a loadMovie() or a loadMovieNum() command on the preloader’s timeline to launch files.swf, and that the initial code of files.swf should have some sort of this._parent._visible=false or other way of deleting the preloader on level0.  Can anyone explain the steps to me, or direct me to a good Flash MX tutorial that explains how to launch another external swf from a preloader .exe, keep track of its load progress, and delete the preloader .exe once the external swf had been loaded?
    Also, I’ve read that, using this construction on a CD, every file has to be in the same place, and that I can’t nest files.swf in a folder named “files,” and reference it with files/files.swf.  Is this true?
    Thanks for any assistance you can offer.

    If you know JavaScript (ECMA Script) then you might be able to get it done applying a for loop and a random function
    to the for loop if you know how to get a page-loaded request into JavaScript.
    But an easier solution, if you know ActionScript 3.0, and if your SWF's don't need to be recoded and can load into a "container" SWF would be to create a master FLA file that loads your SWF's in a random fashion using Math.random() as a multiplier, though you won't see much variation if you only have 2-3 SWF's to load--if you had more than that then you would begin to benefit from the random function's capabilities.  In ActionScript 3.0 use the load() method along with addChild() to load the SWF and add it to the stage.  You will be able to search for specifics on how to code the FLA properly by using Flash's Adobe Help tool and also using an internet search.
    -markerline
    P.S. Once you have the master FLA coded you can Publish it to an SWF and an HTML and if the container/master SWF needs to be in a page with other content you can simply copy and paste the object and embed tags for the container SWF from the published HTML into any place on your master HTML that you need it to reside.  You can then use CSS to control placement of the SWF object if it is in a div tag.

  • How to open a file and display the complete file path?

    In my script, I want to create a dialog that prompts the user to define a few variables for the script. One of those variables is the path to a template file. I want it to work the same way that an upload form works. You click the browse button, the dialog appears so that you can browse for the file and then when you click OK or Open, the full path of the file is displayed in the text box next to it. How do I do this with JavaScript? I got this far and it seems to be working, but the wrong text is being displayed in the text box. Plus: How do I properly restrict the file types to PSD. The code doesn't seem to work, despite the fact that there are no errors reported. Initially the Text box is blank, but After I browse for the file, the text box says: "File". Here is the problem area:
    defineVars.STPnl.STBrowse.onClick = function browseST() {
    var stbFile = File.openDialog("Select the Single Mugshot Key Template File", "File Types: *.psd, *.PSD");
    defineVars.STPnl.STPath.text = stbFile;
    Thank you to whoever assists me! :)

    Change this:
    defineVars.STPnl.STPath.text = stbFile;
    To this:
    defineVars.STPnl.STPath.text = stbFile.fullName;
    The reason is that stbFile is a File object, you need to access its properties in order to get the full path.

  • Can iTunes convert a file and replace the old file with the new one?

    I am trying to convert my wav files to Apple Lossless to save some space. How can I convert the files and make them replace the old files? Right now it just converts new files so that I end up with two files. I have thousands I want to convert and just replace the old ones.
    I have an external program that will do it for me, however if I go that route then when my ITunes files are converted to lossless files I need to re-link the files as they show up with the ! showing they are missing. That would mean manually re-linking every song, which would take forever unless there is a way to mass re-link all the files.

    iTunes does not see the newly created files as the same file because they are not the same file.  They are new, different files.  If you have a track that is 1234.wav and you create 1234.mp3 it simply isn't the same file and you can't trick iTunes into thinking it is.  iTunes will handle it as a brand new file.
    Check Dougscripts web site for scripts which help modifying tag data.  However, I suspect you won't find any doing exactly what you want doing.  Some tag data are only accessible by iTunes itself.
    As for playlists, there's things you can try though they may be more effort than they are worth.  For example, you could add a special code for each playlist to some element of a tag (e.g., grouping).  Convert the file, then make a smart playlist selecting for the code you added to the group of tracks in the old playlist.  If you have hundreds of playlists with a dozen tracks each this will be a grand nuisance.  If it is a handful of playlists with hundreds of tracks each this might be worth it.
    Another way to preserve playlists would be to edit the .xml copy of the iTunes library file, replacing ".wav" with ".mp3" or whatever format you are using.  However, this won't help with play counts because that is only stored in the .itl copy of the file which you cannot edit.

  • How do I work on my raw files and not the jpeg files that currently dispaly

    When I launch Aperture my pictures display in jpeg format, I do however take all my pictures in both raw and jpeg. How do I convert and work on the raw files? Is my interpretation that I am working on my Jpeg files correct?
    My thanks for any help provided.

    The preference to import both and use RAW vs. JPEG as master can be set on import and you can convert on a project-by-project basis.
    You can tell what Aperture is using a few different ways. If you select the meta-data tab then show the "File Info" (the pull-down menu) it'll show you exactly which file it's using as the master.
    Also if you right-click over the mouse you'll see one of the pop-up menu options to "Set JPEG as Master" or "Set RAW as Master" (it'll show whichever one you aren't using -- so if it offers to "Set RAW..." then that means it's currently using JPEG.
    To convert a whole project, it's as gocuk says in the reply above.... select the "Library" tab at left, make sure you highlight the Project you want to convert, then in the menubar pick "Photos" -> "Switch Project to use RAW as Masters" (which will only be bold and selectable if it's currently set to use JPEG).

  • How to read spool file and get the spool file number

    Hey everyone.
    I created a program ztemp that is calling another program ztemp2 within, ztemp2 creates a spool file. Now the requirement is I need to write a code within ztemp to download that spool request and then convert it to the pdf file. I know I can use program rstxpdft4 to convert the spool file to the PDF but for this I need to give the spool number, so can you please tell me how can I get the spool number and then fetch it to the program rstxpdft4 .
    Thank you.
    Rhul goel

    Hi,
       Please check the [link|Convert ABAP List to PDF and display without downloading first; (Rich's reply) and get the spool similarly.
    Or read from table TSP01 to get the latest spool using sy-uname.
    Regards,
    Srini.

  • To install Photoshop CS6, I have already downloaded the 2 files for Windows.  How can I activate the product?

    To install Photoshop CS6, I have already downloaded the 2 files for Windows.  How can I activate the product?

    I am having the same problem. I did download the two files and started the .exe file. The .exe file appears to run downloading files. When the bar is full the window dissapears without any options. Both files are in the same folder. any thoughts?

  • I download autocad 2010 with crack, how can i install it with crack coz i can't find where to paste the crack file? not like windows just go to drive c, progarms and click the installed folder and you can copy and paste the crack file.

    i download autocad 2010 with crack, how can i install it with crack coz i can't find where to paste the crack file? not like windows just go to drive c, progarms and click the installed folder and you can copy and paste the crack file.
    please help me..
    thanks

    No one here will help you.
    You should definitely ask your question in this forum:
    http://forums.autodesk.com/t5/AutoCAD-2010/bd-p/360

  • TS3276 Is there a way to sync POP subfolders and download them for backup in Mail on my MBP? I tried syncing the account with Mail and only the Inbox downloads onto my computer.

    Is there a way to sync POP subfolders and download them for backup in Mail on my MBP? I tried syncing the account with Mail and only the Inbox downloads onto my computer. I have Googled enough to find out that the answer is no, but no official answer or recent answer and I am hopeful that there has been a change.

    Sure-glad to help you. You will not lose any data by changing synching to MacBook Pro from imac. You have set up Time Machine, right? that's how you'd do your backup, so I was told, and how I do my backup on my mac.  You should be able to set a password for it. Save it.  Your stuff should be saved there. So if you want to make your MacBook Pro your primary computer,  I suppose,  back up your stuff with Time machine, turn off Time machine on the iMac, turn it on on the new MacBook Pro, select the hard drive in your Time Capsule, enter your password, and do a backup from there. It might work, and it might take a while, but it should go. As for clogging the hard drive, I can't say. Depends how much stuff you have, and the hard drive's capacity.  As for moving syncing from your iMac to your macbook pro, should be the same. Your phone uses iTunes to sync and so that data should be in the cloud. You can move your iTunes Library to your new Macbook pro
    you should be able to sync your phone on your new MacBook Pro. Don't know if you can move the older backups yet-maybe try someone else, anyways,
    This handy article from Apple explains how
    How to move your iTunes library to a new computer - Apple Support''
    don't forget to de-authorize your iMac if you don't want to play purchased stuff there
    and re-authorize your new macBook Pro
    time machine is an application, and should be found in the Applications folder. it is built in to OS X, so there is nothing else to buy. double click on it, get it going, choose the Hard drive in your Time capsule/Airport as your backup Time Machine  and go for it.  You should see a circle with an arrow on the top right hand of your screen (the Desktop), next to the bluetooth icon, and just after the wifi and eject key (looks sorta like a clock face). This will do automatic backups  of your stuff.

  • HT3819 How do I share my itunes library with my mother on the same computer, but different accounts?

    How do I share my itunes library with my mother on the same computer, but different accounts?
    My mother and I share a desktop computer (apple) and we have seperate itunes accounts. How do we share accounts?

    iTunes Home Sharing now works between users on same computer - https://discussions.apple.com/thread/3865597
    You could set up two completely separate libraries and share music via Home Sharing.
    iTunes: How to share music between different accounts on a single computer - http://support.apple.com/kb/HT1203 - relocating iTunes' media folder to a shared area but leaving separate library files - extra tip at https://discussions.apple.com/message/17331189
    Chris CA's instructions on sharing one iTunes music library between multiple user accounts - https://discussions.apple.com/message/8974074 - Multiple users using a single library file - similar post at: https://discussions.apple.com/thread/3753008
    Suggestion by Turingtest for multiple users and one library - http://discussions.apple.com/message/9117622 - use smart playlists and tags to isolate groupings.
    Discussions on using purchases from multiple AppleIDs in one iTunes library - https://discussions.apple.com/message/19543804

Maybe you are looking for