Is this file a compressed zip file ?

Hi all,
My program receive a file, which can be a regular file or a compressed zip file ...
Is there any way for it to determine if this file is a zip one in order to decompress it ?
Thanks !
Vincent

Try to handle it as a zip file (including maybe the perusal of its contents) and see whether there is an error.
Some platforms come however with the command called "file" which guesses the file type basically upon its contents.
$ file a.xls a.doc c.c bubu.ppt
a.xls: ISO-8859 Java program text
a.doc: ASCII text, with very long lines, with CRLF, LF line terminators
c.c: empty
bubu.ppt: Zip archive data, at least v1.0 to extract
NAME
file - determine file type
SYNOPSIS
file [ -bciknsvzL ] [ -f namefile ] [ -m magicfiles ] file ...
file -C [ -m magicfile ]
HISTORY
There has been a file command in every UNIX since at least Research Version 6 (man page dated January 16, 1975). The System V version introduced one significant major change: the external list of magic number types. This slowed the program down slightly but made it a lot more flexible.

Similar Messages

  • Can't figure out why the "Do this automatically for files like this from now on" is disabled Compressed (zipped) Folders

    I recently had to uninstall and reinstall Firefox. Now with the new version it will not allow me to click the check box "Do this automatically for files like this from now on". The line is disabled and a light gray. I went into the Applications tab under options and can't find the Compressed (zipped) Folders file type either.
    I download a bunch of files for work and to have to click is going to be the biggest pain. Any help will be greatly appreciated!!

    Screenshot:

  • What application do I use to open compressed zip files?

    Hi!
    I am wondering what application I use to open a compressed zip file?
    Thanks.

    Normally you just double-click on them and they open!  The application that does this is "Archive Utility".  Located in /System/Library/CoreServices .
    charlie

  • Problems compressing/Zipping a file

    Hi Guys,
    I'm having some issues Zipping up a file - I need to upload a file and the maximum capacity for the file to be uploaded is 200mb. Its part of an online course that I'm taking and all project submisions need to be in today - I can't figure out what the problem is because theres a few of us taking the course and they have all managed to compress and zip up their files to an appropiate size yet every time I try and compress/zip mine (which is the same file that every one else has) the smallest file size I can manage is 369mb when it needs to be less than 200mb - Can any one please help or shed some light on this - It would be greatly appreciated.
    Look forward to some ideas - Bes Regards, Lillyman

    Its an Ableton Live Project File  -  The format is .ALS
    Sorry guys should have mentioned this in the first place.
    Thanks,
    Lillyman 

  • Compress/Zip Files

    Does anyone know how to compress/zip files in OSX? I've tried doing this through Terminal, but it's been a couple of years since I last tried using UNIX commands and I can't get it to work.
    For what it's worth, I'm trying to compress pictures (.jpg) to email them.
    Any help would be great. Thanks.

    Hi McCons;
    An easy way to get around the file size limitations of email is to establish an iChat session and send the file over iChat.
    Allan

  • I downloaded a .zip file. It ate up my space and i cant find the file. How do i get this file off my phone?

    I downloaded a .zip file. It ate up my space and i cant find the file. How can i get this file off my phone?

    Not possible. Safari won't download and save a Zip file. You either had to use a 3rd party app, or as wjosten suggests, your phone is jailbroken. If the former, you'll need to use that app to find it. If the latter, you'll have to look elsewhere for assistance.

  • Zip bomb - Is this file part of Mac OS X installation? - bootroot.loader

    (Please excuse my bad writing - my English isn't that good.)
    Sophos AntiVirus (most recent version) warns me:
    File Not Scanned (appears to be a 'zip bomb'):
    Macintosh HD:System:Library:PrivateFrameworks:MediaKit.framework:Versions:A:Resources:MKD rivers.bundle:Contents:Resources:bootroot.loader
    AppleCare says on a PowerPC Mac OS X there is no file like this by default - could only be a virus or could have been added by another (third-party) application.
    I found a post on http://www.daniweb.com/techtalkforums/thread59657.html via Google. Someone seems to have the same problem - with a PowerPC Mac OS (Mac mini)!
    I use an Intel Mac (MacBook). AppleCare was not able to tell me whether this file is part of the standard installation of an Intel Mac OS - are you?
    Could you tell me if this file exists on your (Intel) Mac?
    Can you tell me: Is this a zip-bomb - or not?
    Thanks for help.
    By the way: Sophos has never heard of this file.
    Intel MacBook 1st generation   Mac OS X (10.4.8)  

    Well, you could submit it to the virustotal.com site,
    where
    it can be scanned (for free) by all of the various
    virus
    scanners, and you could compare the results.
    Great URL, thanks Russ! Hadn't known it, yet...
    These are the results:
    Complete scanning result of "bootroot.loader", received in VirusTotal at 12.16.2006, 07:49:16 (CET).
    Antivirus Version Update Result
    AntiVir 7.3.0.19 12.15.2006 no virus found
    Authentium 4.93.8 12.15.2006 could be an archive bomb
    Avast 4.7.892.0 12.15.2006 no virus found
    AVG 386 12.15.2006 no virus found
    BitDefender 7.2 12.16.2006 no virus found
    CAT-QuickHeal 8.00 12.15.2006 no virus found
    ClamAV devel-20060426 12.15.2006 no virus found
    DrWeb 4.33 12.15.2006 no virus found
    eSafe 7.0.14.0 12.14.2006 no virus found
    eTrust-InoculateIT 23.73.87 12.16.2006 no virus found
    eTrust-Vet 30.3.3254 12.15.2006 no virus found
    Ewido 4.0 12.15.2006 no virus found
    Fortinet 2.82.0.0 12.16.2006 no virus found
    F-Prot 3.16f 12.15.2006 could be an archive bomb
    F-Prot4 4.2.1.29 12.15.2006 no virus found
    Ikarus T3.1.0.26 12.16.2006 no virus found
    Kaspersky 4.0.2.24 12.16.2006 no virus found
    McAfee 4920 12.15.2006 no virus found
    Microsoft 1.1804 12.15.2006 no virus found
    NOD32v2 1924 12.15.2006 no virus found
    Norman 5.80.02 12.15.2006 no virus found
    Panda 9.0.0.4 12.16.2006 no virus found
    Prevx1 V2 12.16.2006 no virus found
    Sophos 4.12.0 12.14.2006 no virus found
    Sunbelt 2.2.907.0 11.30.2006 no virus found
    TheHacker 6.0.3.132 12.14.2006 no virus found
    UNA 1.83 12.15.2006 no virus found
    VBA32 3.11.1 12.15.2006 no virus found
    VirusBuster 4.3.19:9 12.15.2006 no virus found
    Thanks a lot, folks! Problem solved: no virus, no zip-bomb.
    MacBook 1st generation; PowerBook G4 12" Mac OS X (10.4.8)

  • Compress/zip file

    How do I compress/zip a keynote file that has been needs to be exported to a powerpoint file - So that I can email a presentation?
    Thanks

    Zip is now part of the Mac OS. Right-click on the file and choose "Compress ..." and the file will be zipped.
    John

  • Any body got this file EXTERNAL-RHEL4-10gR2-DVD2-Linux-v2.0.zip

    Hello All,
    please if any body got this file share it with me !
    thanks and regards

    Hi
    After registering into redhat.com
    When I try downloading EXTERNAL-RHEL4-10gR2-DVD2-Linux-v2.0.zip ,
    I have to go to the below:
    4) Select "Channels" from the toolbar at the top of the page.
    5) Select "Easy ISOs" and then click "view the complete list of
    software channels with ISO"
    6) Choose "Red Hat Enterprise Linux AS x86, AMD64, EM64T, & Itanium"
    7) Select the appropriate "Binary Disc's" for your Red Hat solution and
    architecture
    8) Use whichever tool you are comfortable with to burn the ISO images
    to a CD
    But still i do not see the EXTERNAL-RHEL4-10gR2-DVD2-Linux-v2.0.zip
    Can you please advise on
    a. where I can get EXTERNAL-RHEL4-10gR2-DVD2-Linux-v2.0.zip
    b. if not atleast which of the CDs from the channels on redhat.com I need to be downloading
    Can you please help?
    Thanks a lot
    Cyril

  • HELP! "This file is damaged and cannot be repaired."

    I have been editing a large (25+ MB) PDF in Adobe Acrobat X Pro on a Macbook.
    I just tried to open it to continue editing and got an error message:
    "This file is damaged and cannot be repaired."
    What on earth happened?!?!
    A few days ago I saved a compressed version that is 1/10th the size. I can use that if I absolutely have to (it means losing part of my work and not all of my work) but I'm nervous -- what is the difference between a compressed file and a standard file that would make the compressed file 10% of the size? Is it fully functional with edits?
    Ideally, if someone could help me remedy my error problem on the main file, that would be preferable -- but I'll also take info on compressed files (I didn't zip it, I just saved it in "Finder" as a compressed file.)

    Lara,
    yes it said something like "some fonts are not supported..etc...would you like to open the file anyway." (sry cant remember verbatim...I had a friend of mine try to open it on her comp which has cs3).
    I believe CS3 should substitute the fonts in question, or at least give you the option to substitute them. Did you try saving it from CS3 (with or without font substitution) and then opening in CS4 as I suggested?
    CS4 may be more particular than CS3 when it comes to fonts. Illy is more particular than most applications (some applications open files with corrupt fonts that she flatly refuses), and she may have become more particular over the years.

  • Error message - how can I open this file?

    I'm getting this messsage when I try to open an Illustrator file: "Acrobat PDF file format is having difficulties. Non-hex character in a string."
    Any ideas on how to get this file to open? I'm trying to open it in CS4 after working on it in CS3, but I haven't tried to open it again since saving in CS3 so it may have this error on both versions.

    That would be my inclination. File may have been sent as ascii when it should have been sent as binary or vice versa.
    In 99% of transfers it's ALWAYS safest to zip an AI or eps file before sending it anywhere.

  • This file appears to be damaged..HOW?

    I type a lot of my stories and things in AppleWorks and I tried opening two of my files-but a window popped up that said "This file appears to be damaged and cannot be opened." How did this happen? I would really like to reopen this files so that I can edit them, but I don't know if I'm going to be able to do that. Please help ASAP.

    Whether Mac or Windows, a file can become damaged (or corrupt is another term). Sometimes the "may be damaged" message could be caused by something else such as drive volume corruption, a font used in the documents has gone belly-up or Appleworks application package corruption. First, believe the message that the two documents are actually damaged and go forward from there.
    As others mention, it is sometimes possible to open a corrupt file with another application. Find TextEdit in the Applications folder (ignore the icon you see elsewhere, such as in the Dock or on the desktop.). Then just drag and drop the file onto TextEdit. It may not open or it may open and show wierd stuff. Among the wierd stuff you might be able to find most or all of your text that you saved. Copy the text and paste it into a new, blank document of Appleworks.
    Now, here is some advice that I want you to take in the kindest possible way. When a document is important, make an extra copy of it and save it to some removable disk, such as a Zip disk or burned to a CD. If the document is VERY important, make backup copies on two different removable disks.

  • 'This file type is not allowed...' error on uploading CX Archive file

    On uploading modified jar file to the exisiting CX archive path, it says 'This file type is not allowed. Please choose another file.'. This issue occurs only in the TEST environment while the error is not thrown in DEV. Any idea why this might be? Tried renaming it to .zip, but it did not help either. Thanks in advance.

    Here is the Response from our DBA. "I reviewed those docs (Notes 1432305.1 & 1357849.1 ) and these file format already included in Jan Security patches".
    Did your DBA follow the instructions in Note 1357849.1 to change the security structure to allow .jar files?
    It looks like we already have both January and April security Patches applied on the environment but we are still facing this issue. We are not facing this error in another Instance Where we don't have these security patches applied. Any direction?Please see Note: 1357849.1 and make sure the solution is implemented. If you still get the same issue, please log a SR.
    Thanks,
    Hussein

  • Why my Firefox v6.02 browser always open *.csv (comma delimited) file in another tab rather than downloading a file? I do not have right click option to save this file.

    My Firefox v6.02 browser always open *.csv (comma delimited) file in another tab rather than downloading a file? I do not have right click option to save this file. My OP is windows XP sp2.

    Hi mha007,
    Go to this site "http://www.nseindia.com/content/indices/ind_histvalues.htm"
    Select any Index type and from dates select just one day or any number of days. Click "Get Details" button. This will open tabular data on loaded page (with link CSV file link at bottom).
    When I click this link, it opens CSV file in new tab (in Firefox browser) and does not open download window (just as in case of other file formats like *.zip, *.rar or *.xls).
    Right-click of link does not give "save as" or "save file" option.
    Firefox is my preferred and default browser.
    ========
    surprisingly, When I do same thing in IE6 browser, data-table page shows 2 options below table, i.e. (1) download file (2) open file.

  • The aspect ratio of this file is  not support by DVD. Possible slideshow error?

    hello everyone,
    I will try to give as much information as possible.  Dont scream at me if i forget anything.  For starters, I just learned how to use Adobe Encore CS4.  I taught my self between reading the  help files and videos I found on the web.   I am an amateur when it comes to DVD authoring (could have alot to do with my problem).  Im an animator and I am making a DVD to show my demo reel, drawings, and i have a storyboard to final comparison video.  I designed all of my menus in photoshop.  I have one transition that was animated in after effects that was imported using dynamic link.  My demo reel is a mov file at 640x360 widescreen, half the size of HD 720p.  The comparison video is a premiere file from dynamic link (same size as the demo reel). There is some background music for the menus. Then I have 3 slideshows, and i believe this is where the error is coming from.  Most of the artwork has the same dimensions but there are some that are larger or smaller.  Some are jpg, but most are PSD files.  The slide show is set to manual advance with music in the background. I have no transition effects on the slideshow.  When building the DVD, i believe when it says "starting project" after all the importing was done,i get the error
    The aspect ratio of this file is  not support by DVD. PGC info: name= Figure Drawing (name of the slideshow and a menu button) ref=Fpgc, time=234.2340s
    I just tried to build the DVD without the slideshow and I still get the error. Possibly a menu issue? I have no idea. Ive ran into errors before but I was able to get through the others.  I just cant seem to find a solution to this error. Even after searching the forums for similar problems. Hopefully, the solution is simple. If more info is needed let me know.  I really need this DVD to send out for jobs!! Thanks everyone.
    Brandon

    When doing SlideShows, whether in Encore (somewhat limited), or in PrPro, it is always better to re-size outside of these programs, prior to Import. I use Photoshop (PS) to do this, and use an Action to get everything in the proper Mode, Color Space, Size - everything. I always do a Save_As and use .PSD files. I also Save a working version, incase I have Flattened, etc., for Import into the NLE/authoring app.
    JPEG's *should* work fine too, though there is the JPEG compression to deal with. Might not be an issue, but for max quality, I start with RAW images, process to .PSD's, and then work from copies of these, to get my still Assets ready for PrPro, or En.
    I either size exactly to my Project Preset, or to exactly what I need, if say I will pan across a zoomed out image. In a major Project, I may have sub-folders with 4 different sizes of image - based precisely on what I will need to do with that/those image(s). If I will not need to do any animation on any images, then I use that Project Preset (including the correct PAR) and they work perfectly. This also eliminates any unnecessary overhead on the system.
    Good luck,
    Hunt

Maybe you are looking for

  • RF monitor, Assign areas & activities to queues ,TO priority

    Hi, This is with reference to RF monitor (LRF1) functionality in Mobile data entry I would like to know whether SAP has solution for below mentioned additional requirements. 1) Assigning transfer orders from one queue to other queue through LRF1 2) C

  • How to make Manufacturer Information Available For Display in SC

    Hello, We would like to make the Manufacturer Part Number and External Manufacturer available for display in the shoppng cart. Also, UNSPSC for that matter.  I know these are in the shopping cart as loaded from the external catalog but have not found

  • How to marshal data directly to java.lang.String ?(JAXB, Marshaller)

    The "Marshaller" interface provide some basic methods. It can marshals to a File, or a SAX ContentHandler, or a DOM Node, or a OutputStream etc... But I just only want to marshals to a String, and then sent the String as TextMessage via JMS. So, Is i

  • Mail sent to SBWP outbox but not showing in SOST

    hi... i am using... CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'     EXPORTING       document_data              = w_document_data       put_in_outbox              = 'X'       commit_work                = 'X'     IMPORTING       sent_to_all          

  • RSS feeds not "highlighted"

    Hi all, I've recently upgraded to Snow Leo from 10.4, I used MobileMe to sync my bookmarks, etc to my new desktop OS. All is fine. HOWEVER, new RSS feeds are grayed out as if they've already been read or selected. They haven't. It's makes it tough to