How to eliminate Directories while i'm zipping files???????

I;ve used ZipCompress.java from Thinking in Java...
Here if we give in the command line D:\Test\*.* and inside say we r having 2 files and one directory...
At that time it came out with exception..If there is directory then its not working...if files only there then its working.. it should not consider dir and it should zip only the files..
Pls help me.

java.io.File
boolean isDirectory()

Similar Messages

  • How to extract the audio of a zip file? if it helps I'm trying to add this album zip to my library

    how to extract the audio of a zip file? if it helps I'm trying to add this album zip to my library

    Let's say you have a zipped audio collection (audio.zip) containing mp3 files. And you are at a Terminal prompt.
    List the files in the zip archive
    unzip -l audio.zip (that is ell)
    Extract all mp3 audio files into a new home directory folder called mymusic
    unzip -d ~/mymusic audio.zip \*.mp3
    Variations of the above will depend the zip contents, and internal structure. If the zipped audio collection was gzipped, or someone used rar on it, then the extraction process will be different.

  • How to eliminate spaces while reading a file in BPEL Process

    Hi All,
    How to eliminate space when reading a file which of fixedlength and inserting into database.
    Inserting some of columns sucessfully but there is a column where there is a space n front the value, how to eliminate the that space.
    I have a custom XSD and using out in the process. How to resolve this issue to get all rows sucessfully inserted into the database.
    Anyone hod gone through this kind of functionality.
    Regards,
    CH

    Hi,
    try to use XPath functions like 'normalize-space()', 'right-trim()', 'left-trim()' in your transformation.
    Regards,
    Martin.

  • How do I create and send a zip file? I have Lion and I'm working in Word for mac

    To show you how little I know about any of this, I don't even know if this is the correct forum in which to ask this question. I'm a copywriter. I have a client in France. I have 15 word documents, 15 of the same documents in PDFs and a small Excel document to send him. Simple, mutlipage Word docs. Short two-page Excell sheet. I want to create a zip file for them to send to him. Can I do it? How? I have unzipped zip files other people have sent to me, but I've never created or sent one myself. I'm working in Word for Mac 2011. I have Lion. I'm using Mac's email. Please don't assume I know anything. I need very, very simple, play by play instructions. You are all very helpful, so I have high hopes.
    Nancy

    Visit:
    http://download.cnet.com/MacZip/3000-2250_4-10025248.html
    You will be able to both zip and unzip. If the recipient of your zipped file does not have zip, he/she will need to get it, or you could send him/her the above address so that he/she can unzip his/her file.
    (I wish the English language could settle on the use of something less clumsy that he/she him/her etc.)
    BTW, I think that you can zip only folders, not separate files, so put even one file into a folder before zipping).
    Message was edited by: SteveKir Added BTW

  • How do I open a pw protected zip file?

    This question appears to be different from similar questions asked because I HAVE the password. I really don't want to download extra safe-cracker's-anonymous software to hack into it. The file just never gives me the option of entering it. I have the zip file, I double-click on it, it gives me an error message. I right-click on it but no options there either. How do I open it such that it gives me a chance to unlock it?
    Appreciate the help. (and yeah, I have no idea if I'm in the right community - sorry about that if I'm in the wrong place)

    The zip file format is not a nice, standardized format. You could have a weird zip file that is technically not bad, but isn't supported by the built-in software on Mac OS X. In some cases, when zip files won't open, I've had success opening them with The Unarchiver, which is available both in the App Store and outside it:
    https://itunes.apple.com/us/app/the-unarchiver/id425424353?mt=12
    http://unarchiver.c3.cx
    (I don't know if there's a difference in functionality between the two... there could be, but if there is, I am not aware of it.)
    It's also possible the zip file is corrupted, and won't be openable by anything.

  • How do you stop automatic unzipping of .zip files

    When downloading a flashable .zip file Yosemite automatically unzips it.  How do you prevent this?

    We've been experimenting with this today.
    You can avoid getting the file by turning off the autodownload in the IM settings. The sender sees the file transfer, but it's not going to your machine. To get the file, you then need to click on it. It IS still going to Skype's servers though waiting to be retrieved and that is a worry.
    A link is generated to retrieve the file. The link is sharable with anyone who is a skype subscriber.
    Are these files ever deleted?
    This makes me worry about the security all files sent via skype since it is the way-station and holder of these files. For instance, is it possible for a computer to check the randomly assigned numbers until they find all sorts of things?
    We are using the 7 series versions.

  • How can I avoid Mail automatically producing zip files

    When sending an email with Mail and attatch a .jpg fie. The recipient automatically receives a zip file. How can I avoid this?

    What is you send a copy to yourself?
    How large is the jpg file?
    You can change file size of photos yo send. See:
    https://discussions.apple.com/message/17483756#17483756
    I just tried on my Mc with 10.9. I send it from my @me.com account to the @me.com account and opened on the Mac and the photo was still a jpg.
    I also send it to my [email protected] and opened it via webmail and it was just the same jpg.

  • How to create a self-extracting downloaded Zip file ...

    I have a question about Mac file compression for an eBook PDF.  I know how to compress the file with Mac OS X 10.8.5.  I right-click the PDF I want to compress and select "Compress <file name>" from the Contextual Menu.  The file is compressed as a ZIP file.  The file I'm compressing will be distributed from a web server to Mac users.
    SITUATION:  I want the Mac user to be able to download the ZIP file to their Mac.  Once the ZIP file is downloaded to their Mac, I want the ZIP file to automatically open to place the eBook PDF on their desktop - so please indulge me here.  I know that a Mac user only needs to double-click the ZIP file to extract the eBook PDF, BUT, IF POSSIBLE, I want this to happen automatically after the ZIP file is downloaded.
    QUESTION:  Is there any way to automatially extract the eBook PDF from the ZIP file once the Mac user downloads the ZIP file to their destop?  If so, how do I do this?  If not, is there anyother way to do this that does not required any additional software like StuffIt Expander to decompress the file?  As an aside, If I compress the eBook PDF using Mac OS X 10.8.5, is this compressed ZIP file compatible with older versions of Mac OS, i.e., can they double-click the compressed ZIP file to open it?
    Thank you in advance for your comments and help . . .
    Jim Minor
    Email: [email protected]

    In OSX, zip extraction depends on the browser and browser settings. For example, Safari will open files automatically depending on this setting in Sarari Preferences: So the short answer I think is no. Your zip recipients are going to have to click on the zips to open them if their browser is not set to open them automatically.
    I'm no zip expert but I would think a zip is a zip and should be compatible with older versions of OSX. That is, 10.4 or later, which didn't include Stuffit any more. Earlier versions would need Stuffit or something similar.

  • How to import an oss note related zip file

    Hello everybody.
    In order to apply an oss note to our systems, I have to import a .zip file containing two (non human readable) .u6b files.
    But I don't know how. Also, the correction instuctions are not helpful. They only say "To implement this new message class, import the attached file xyz.zip.".
    So I first tried to create the message class via SE91, then I looked for any transaction and/or utility in order to import this file, with no results.
    Is anyone familiar with this problem? How do I have to proceed?
    Thanks in advance!

    Hi,
    I guess that this zip-file contains a transport. This transportfiles have to be copied in the /usr/trans/data und /usr/trans/cofiles and imported by the transaction STMS.
    Thomas Jung wrote how to do this in this: How to import examples from book "Advanced BSP Programming"
    Perhaps your basis administrator can help you to do this?
    Regards,
    Stefan

  • Error while opening Attachment(ZIP files) in work-flow inbox(Portal)

    Hi Experts ,
    We are getting error , when we try to open the Attachement (ZIP file) link from workflow-inbox(portal side). We are able to open the attachment sucessfully from backend . But we are getting error"Internet Explorer cannot download from void (0).No such interface supported.u201D when we try to open the attachment from portal.The attachment is ZIP file.
    Please help us to resolve the error.
    Edited by: AlokSBP on Apr 16, 2010 10:46 AM
    Edited by: AlokSBP on Apr 16, 2010 10:49 AM

    Thanks for the response...
    The issue is only occurring for the ZIP file extention . we are able to open the document in other files extentions from UWL inbox(portal).
    We have checked few more threads in SDN & got some link mentiioing the Tcode :- DC20 and DC30 (related to file extension) . As explained in the Tcode DC20 and DC30 . the file extention entries has to be maintained.
    We have made the entry of ZIP file in the DC20 & DC30 but still we are getting the same error. I think we are missing some entries to fill.
    It would be great if you can suggest regarding this issue...
    Is this is the cause of the issue ?
    Appreciate your help.....
    Cheers:)
    Edited by: AlokSBP on May 3, 2010 12:40 PM

  • How to prevent automatically opening of downloaded zip-files?

    I have a problem to install an extension in Joomla. Joomla asks for a Zip-file. When I download the zip-file from the website, the zip-file is shown in Finder as a folder, i.e. an opened zip-file. Joomla does not see a folder, because it looks for a zip-file. I have a terrible solution, but I am sure others will know a better one. I used my old Windows computer, downloaded the zip-file that in Windows shows the extension .zip. Copy the file to Finder and now it shows in Finder the file as a zip-file. So, I suppose that my OS X (now Yosemite, but it happened already under Maverics) or my Safari changes a zip-file in an opened form. I could not find a way to change this to the state that Safari, Finder or OS X is not automatically opening zip-files.

    Choose Preferences from the Safari menu, click on General, and uncheck the box to automatically open safe files.
    (114978)

  • How does OS X Mountain Lion handle zip files

    For zipped files do I need a third party app or does the OS take care of zipping and unzipping the files?

    Astonishingly, you cannot do an in place view of the zip file without actually unzipping it. There are some commercial tools that do this, but as a former Windows user, this is just ridiculous and very inconvenient to me.

  • How to prevent unauthorized extraction of the zip files I created.

    Hi all,
    Can anyone help me in knowing abt this.
    Is there any way to prevent unauthorized extraction of the zip files I create using Java.
    Plz help friends.
    Thanks in Advance.
    -James

    Since you already found out that Java's zipping methods don't implement password protection, all you could possibly do is encrypting the contents.

  • Issue while sending a zipped file from ABAP to JAVA layer

    Hi All,
    I have a requirement wherein i have to zip a xml file in abap, convert it to base64 encoded string and send it to JAVA layer.
    I'm using the class CL_ABAP_ZIP for zipping the xml string and FM "SCMS_BASE64_ENCODE_STR" to convert the zipped data to base64 encoded string.
    But on the JAVA layer we get an exception while unzipping this data.
    Has anybody come across a similar situtation.
    Please help.
    Regards,
    Ankit Agrawal

    Example
    REPORT  Z_PAP_UP_ZIP_DL.
    DATA: L_ZIPPER TYPE REF TO cl_abap_zip.
    DATA: FILEX type XSTRING.
    DATA: FILENAME type string.
    DATA: PATH type string.
    DATA: zip type xstring.
    DATA: FILE_N_TAB type FILETABLE.
    DATA: FULL_PATH type string.
    DATA: FILE_LENGTH type i.
    DATA: FILE_TAB type w3mimetabtype.
    DATA: WA_INT type int4.
    DATA: PATH_TABLE TYPE TABLE of char1024.
    "    Load the file
    "Which file to upload
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      CHANGING
        FILE_TABLE              = FILE_N_TAB
        RC                      = WA_INT
    "load the (first) file from the frontend the user has selected.
    LOOP at FILE_N_TAB into FULL_PATH.
    "get the file
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
         EXPORTING
           FILENAME                = FULL_PATH
           FILETYPE                = 'BIN'
        IMPORTING
          FILELENGTH              = FILE_LENGTH
        CHANGING
          DATA_TAB                = file_tab.
        exit.
    endloop.
    "create xstring from table
    CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
      EXPORTING
        INPUT_LENGTH       = FILE_LENGTH
      IMPORTING
        BUFFER             = FILEX
      TABLES
        BINARY_TAB         = file_tab
    "get the name of the file. we take entry after the last '\' ...windows.
    SPLIT FULL_PATH AT '\' INTO TABLE PATH_TABLE.
    DESCRIBE TABLE PATH_TABLE LINES WA_INT.
    READ TABLE PATH_TABLE INTO FILENAME INDEX WA_INT.

  • How to stop prompt while opening an excel file in new window

    hi all
    i made one table in jsf and i am having two icons corresponding to each row one for open and one for save. on the click of open i am calling web services getting the excel file and opening it but it is happening only . when i choose to open option from the prompt which comes when i click on the link. how to remove that prompt so that on click of the open it should directly open the excel file. plzzzzzzzzz hepl

    in the url of the new page that you are opening add --> &RetainAM=Y at the end.
    Following points should be useful :
    Suppose ,you have to open a new window from your page by clicking on a link or a button and after opening, when you click on any button in the parent page, if you are getting a session out error… try the following solutions:
    1.     Add retainAM=Y in the destination URI of the button or link
    2.     If you have the back button handling in your code, ensure that…
    if (!pageContext.isBackNavigationFired(true)) is written instead of
    if (!pageContext.isBackNavigationFired(false))
    3.     Also ensure that the trasaction name is exactly same in both startTransactionUnit and end TransactionUnit
    TransactionUnitHelper.startTransactionUnit(pageContext, "sameName");
    TransactionUnitHelper.endTransactionUnit(pageContext, " sameName ");

Maybe you are looking for

  • How to get video from DVD into FCE?

    Hi, I have a DVD which I got from a childhood friend. The DVD contains a compilation of old film clips (her family had old super 8 movies transferred to DVD). I'm trying to import the clip (it's one long video clip, 30 mins long) into FCE for editing

  • No signal on Apple TV3

    Today i turned on my TV. Pressed the apple remote, the apple TV3 is showing the usual white light. But, the TV says "no signal, check the connected device powersupply and cable connection and sourcequality" When i press on buttons on my apple TV remo

  • Backup of database on 11.2.0.3 problem

    hi, i have database running in 11.2.0.2 on linux 5. the database is on no-arcvhive mode. I am trying to take the cold backup from rman script but the problem comes when the script tries to start database in mount but it says the the service identifie

  • Crashing Multiple Times a day

    I have been crashing several times a day; I am on Yosemite 10.10.2. I am getting this message over and over again. I  have trimmed this; it goes on forever. 2/11/15 3:02:03.000 PM kernel[0]: BUG in process suhelperd[214]: over-released legacy externa

  • Portal Login test script

    This is a little script that shows how to login and test for a certain text on the portal desktop. #!/bin/sh gwname=$1 USERNAME=myuser PASSWORD=mypassword #Organization dc=mycompany,dc=com ORG=dc%3Dmycompany%2Cdc%3Dcom DESKTOPTXT=webmail #Curl option