Binary File oder Text File

Hello all of you!
Maybe someone could help me with a little problem. I had been writing some sort of BinaryFileFilter to look if a File is a binary File or a normal Textfile.
Does someone know if there is class or method for this??? Or how would you guys solve this problem???
I had been looking for every Character, but this seems to be not enough...
Can anyone help me?

But that is excactly my Problem. So what is the different between a textfile and a binaryfile ?? The Characters are, or not? Or what kind of different is there more? For example a german � or �. Is it a special Character that is only in Binaryfiles or is it even in a german *.txt file?! It could be both, or not. The other way to be sure that it is a binary file is maybe to look at the ending of the filename for example *.bin. But even in that way you cannot be realy sure that it is a binary file.
So, that�s why i asked if someone has an other solution for this problem.

Similar Messages

  • Save as PDF file as excel file or text file in vba excel

    Hi all,
    I am opening a PDF document fromm VBA excel. After opening document it should save the document as excel file or text file in one folder.
    I am trying to do this with some code but not able to , pls help me thatnks.
    Dim AcroApp As Acrobat.CAcroApp
      Dim Part1Document As Acrobat.CAcroPDDoc
    Set Part1Document = CreateObject("AcroExch.PDDoc")
       Part1Document.Open ("Z:\EG MI Information\MIS\Requests\Req_156\NO.1.pdf")
      Dim app As Object, avdoc As Object, pageview As Object
    Set app = CreateObject("AcroExch.App")
    Set avdoc = app.GetActiveDoc
    app.MenuItemExecute ("SaveAs")
    thanks
    Abhijeet

    Hi,
    In the documentation for the saveAs function it has the following params
    cPath The device-independent path in which to save the file.
    cConvID (optional, Acrobat 6.0) A conversion ID string that specifies the conversion
    file type.
    cFS (optional, Acrobat 7.0) A string that specifies the source file system name.
    bCopy (optional, Acrobat 7.0) A Boolean value which, if true, saves the PDF file
    as a copy. The default is false.
    bPromptToOverwrite (optional, Acrobat 7.0) A Boolean value which, if true, prompts the user if
    the destination file already exists. The default is false.
    In order to get a text file saved you need to specify the correct cConvID.
    See the documentation for the valid convID's - http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_AcroJS.88.519.html
    Please note the Acrobat SDK contains all the information and does not require much installing ( as it is a zip file(on windows) and a disc image (on Mac) it just needs extracted)
    Regards
    Malcolm

  • Download File thru Text file and add password to protect text file

    Hello ABAPers,
    I have a problem regarding downloading of file in text file with password...meaning I need to protect with password the text file i created without human intervention...is it possible to ABAP? im using FM GUI_DOwnload and save it to text file.
    Please Help...Will reward points ...
    Thanks in advance.
    aVaDuDz

    Hi
    You could use OLE to integrate SAP with Excel - create files, execute macros etc. (search for DOI on SAP help), but this will only work on the presentation server, so you couldn't run it as a service in background. I suppose your e-mails are sent through the internet, hence the requirement for encryption -- or maybe your client doesn't trust its network people! For this you really should use strong encryption -- anything less, you might as well send plain text. One solution to this would be to send the email down a VPDN -- this would encrypt all traffic between source and destination. Another would be to encrypt the file just before it is attached to the email. This could be done within ABAP, but perhaps a third party public key encryptor would be better placed. This could be invoked via a system command call, or as an RFC. A third solution would be to have your mail server handle the encryption.
    Heres the link for the above explaination
    http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_gci1037837,00.html?track=sap805s
    One more link
    <a href=" http://www.telfordpct.nhs.uk/healthcare_professionals/SAP/creating_sap_documents_in_word_copy(1).htm ">http://www.telfordpct.nhs.uk/healthcare_professionals/SAP/creating_sap_documents_in_word_copy(1).htm</a>
    Regards
    Raj
    Message was edited by:
            Rajasekhar Dinavahi

  • My Illustrator CC show Dxf files as Text files...

    My Illustrator CC identify my dxf files as text files...
    even they are valid dxf files as Acrobat or Rhino are able to open them...
    Any hints ?
    Many Thanks

    Hi,
    It's generated as an export by a tierce Application...I'm trying to get from the editor to which version their Dxf is supposed to be compliant.
    JM

  • Binary search in text files

    Hi all,
    I'm thinking about how to implement a binary sort to get,given a key, a value from a text file with a list of words in order. I saw randomaccessfile for j2se and I know that this work it's usually done by seek functions but how to do the seek work without the File class , with only the InputStream and Reader? I'm talking about the j2me midp 2 cldc 1.1 api, is there some methods or class to use for this thing? How could be implemented a binary search in a text file resident in the /res dir or the JAR or which could be the problems that cannot make possible this staff? If there was something like seek one way could be that one of decide a common length of words to read so going to the half of the text file it's possible with simply multiplication, and the do the binary search things.But for now I haven't found any resources or help.
    I hope you can help me to understand, thank you

    Hallo all,
    it is NOT the problem to locate the text I need to find in the fmb, or fmx.
    The problem is that since I want to change not only the text but also some more code around I want to do this in Form Builder - Object Navigator. And I'm not able to discover in which trigger or procedure the text appears.
    I do not want to edit fmx, or fmb in a text editor because I suupose theer are some checksums hidden for the format.
    -duro
    BTW in FMT there is no code seen (only some binary) for v6i as it was in v4.5.

  • Binary V/s Text files.

    What is the difference between binary and text files?
    Thank you for your reply.

    What is the difference between binary and text files?
    Thank you for your reply.They're both just files of (binary) data. The real difference is just in the way that they are read/written. Text files are 'line-delimited', having a sequence of cr/lf combinations (depending on platform) to separate 'lines' of 'text'.

  • How to convert Labview log file to text file?

    I want to open the log file in Excel or other text editor. Is there any special format of Labview log file? I thought it just binary, so I used a general program to convert binary file to Ascii file. But it failed because of the format of the log file format. Is there any other way that I can read log file in Excel? Thanks a lot.

    Dennis Knutson wrote:
    Are you refering to the front panel logging option? The actual binary format is going to depend on what controls and indicators you have on the front panel and their data types. There is an example of using the file i/o functions to read one of these files in chapter 14 of the user manual. The problem you'll have if you write a program to read a log file is that every time you add or delete a control/indicator, you'll have to rewrite your program and then you'll be unable to read older log files. You'd be better off writing your own log routines. Then you would control the binary format. There are shipping examples that you can look at for fbinary file storage.
    Yes, I am referring the front panel logging option and I will read the maual first. Thank you very much for your help.

  • How can I open in java file a text file?

    Hi !
    For example I have a java file name Pencil.java and I have a text fie name Box.txt
    I want like that if ( a == b ) {open Box.txt}
    How can I do that ?
    Thanks.

    Yes I want to see what this text file contains. Like clicking to a text file with mouse and opens. Then I can see what it contains.
    I have a Java document Pencil.java and I have a text file Box.txt
    I will write a java code in pencil.java ( that I dont know ). Then when I enter a number from keyboard with
    Scanner write = new Scanner(System.in);
    int a = write.nextInt()
    if (a == b) {                } opens Box.txt
    For example
    I write to command prompt
    java pencil
    It wants from me a number : I will enter 3.
    It is same as b .
    Then Box.txt file opens.
    Edited by: zue on Jun 3, 2008 11:04 AM

  • Save file as text file

    i will try this again.
    i have a table with lots of fields. one field has event type
    i would like to count event type and save it to a text file with the heading of type of event, say "accidents", "alarms".
    i only want the total number and to be displayed in horizontal
    in the saved text file.
    thanks for any help
    example: select count(*) event type from event
    result: "accidents" "alarms"
    324 343

    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0042: unknown command "INJURIES"" - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0042: unknown command "INVOLVED"" - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning "S / STINGS..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0042: unknown command """ - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning "HIVES,ITCH..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0042: unknown command "TUATION)"" - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0042: unknown command "PRESENT)"" - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0734: unknown command beginning ",SUM(DECOD..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0042: unknown command "HEMO."" - rest of line ignored.

  • Help on converting xml file to text file

    Hi,
    I have xml file and i want to convert to text file ...
    How do i write a perticular tag in perticular line by the time converting xml to text file using xsl ...
    Ex:
    input XML file:
    <NAME> venkat </NAME>
    <ADDRESS>
    5800 Lander Brook Drive
    </ADDRESS>
    output ASCII File:
    245 venkat
    300 5800 Lander Brook Drive
    In this example TAG <NAME> should write into line 245 and
    TAG <ADDRESS> should write into line 300 etc...
    here is the xsl file to above xml file ..
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match="/">
    <xsl:value-of select="Name"/>
    <xsl:value-of select="Address"/>
    </xsl:template>
    </xsl:stylesheet>
    how do i write Name value in line number 245 in the text file , similarlly how do i write Address value in line number 300 in the text file ...
    How do i specify the value has to go to a perticular line ... i know name has to goto some line number, address to some line number etc ,,,
    Any help on this please .....
    Thanks.

    sorry read: XSL.
    you will have to create your own tool to generate your text file in order to truly ensure the position of your data in the text file.

  • Script to add description and keywords to files from text file

    Can anyone write something up for me? I will admit I cannot do it myself, I do not know Javascript.
    I need to add keywords and a description to 1000's of images. I have a text file formatted as such for each 100 images. The script would need to ask for an input file (or I can hardcode the path into the script) and then apply to the current folder of images shown in bridge.
    Text file example:
    1000 - Bright Sunset Over City. (sun;city;sky;mountain;) .
    1001 - Dawn Behind Mountain And Lake. (sun;mountain;water;sky;) .
    1002 - Bright Red Sunset, Light Edged Clouds. (sun;sky;tree;clouds;) .
    1003 - Tree Framing Sunset Over Bay. (tree;sun;lake;bay;) .
    1004 - Sun Behind Gull On Pilings. (seagull;sun;sea;pilings;) .
    images are named 1000.tif, 1001.tif, 1002.tif etc
    Running on a Mac with CS3 and CS4.
    Thanks,
    Chris

    Hi Paul,
    This is nice example, but your script incorrectly sets both dc:description and dc:subject as ordered arrays. Description should be an alt-text type property, and subject is an unordered array (or 'bag'). Some software might not tolerate the incorrect XMP data types.
    Here's an example showing the wrong and write way to set these two properties using the XMP Script API:
    // load the library
    if (ExternalObject.AdobeXMPScript == undefined) {
        ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    var Desc = "Test Description";
    var Keys = ["One","Two","Three"];
    // The wrong way to set the Description. and Keywords...
    var bogusXmp = new XMPMeta();
    bogusXmp.appendArrayItem(XMPConst.NS_DC, "description", Desc, 0,XMPConst.ARRAY_IS_ORDERED);
    for(var s in Keys){
          bogusXmp.appendArrayItem(XMPConst.NS_DC, "subject", Keys[s], 0,XMPConst.ARRAY_IS_ORDERED);
    $.writeln( bogusXmp.dumpObject() );
    // The correct way to set the Description and Keywords
    var correctXmp = new XMPMeta();
    correctXmp.setLocalizedText( XMPConst.NS_DC, "description", null, "x-default", Desc );
    for(var s in Keys){
          correctXmp.appendArrayItem(XMPConst.NS_DC, "subject", Keys[s], 0,XMPConst.PROP_IS_ARRAY);
    $.writeln( correctXmp.dumpObject() );
    Thanks,
    David

  • Binary transfer of text files

    I'm trying to do this - edited FTPExtensionMap.txt
    accordingly, but get no joy. Files are still going up as ascii.
    I've restarted both DW and the OS (Win XP, DW 8). Has anyone
    experienced similar? I'm uploading to IIS.
    Thanks

    Guess I should have scrolled down to the app dev forum before
    posting - found my answer - there's two places that file resides
    and I edited the wrong one.
    Thanks...

  • Downloading .7z file as text file instead of archive

    Firefox has problem downloading .7z file. I read on other post that this is server side related but if I try to download the same file using Internet Explorer it download fine. So there has to be something that can be done to fix this problem.

    Changing the setting for alt click didn't help, I press alt after pasting the link and then press enter, open the file in a new tab but still as plain text. I also tried pressing alt 1 sec after pressing enter but the file still appear as text instead of archive.

  • Quick Time opens internet.wmv files as text files

    I'm trying to open internet video files that are generally .wmv files. Quick time does not open them, rather they open in a text format. Ideas? Thanks!

    As the above poster said, you can download Windows Media Player for Mac to view .wmv files, or you can use my preferred method. Although it will cost you $9.99, you can download Flip4Mac's WMV Player. This is a Quicktime Codec that allows you to watch .wmv media within Quicktime and within your browser ending up as a complete media solution. You don't need two different applications.
    Hope this helps,
    Ryan.

  • Saving a smart folder as an excel file or text file or whatever

    I am new to the Mac.  I have created a smart folder.  I would like to copy the contents of the folder to incude the "Options" I have selected.  IE, Date Created, Date Modified. 
    I want to save this information in a excel file - I want to be able to sort by Date Crated or Date Modified or File Name. 
    I figured out how to save just the file names - but I really could use this other information.
    Any suggestions?

    In Adobe Reader you can use File > Save As > Text...
    When you want perform this task with a programm you must use Adobe Acrobat.

Maybe you are looking for

  • Pulling time used for only a certain time period for 11 different fields.

    I have a report that pulls my OR room case times. Each room is set to different "open" times, ( rm1 open 12 hours, rm 2 open 12 hours, room 3 open 12 hours, room 4 open 7.5 hours, with Room 7 "off duty", etc.)  I only want to pull data for the times

  • Switched Database to ARCHIVELOG Mode, Then it Hung

    Hi everyone, This db is 9.2 on Windows. **After switching my database to Archivelog mode and reopening, it hung forever.** (I had to use Shutdown abort to bring it down - these steps worked to get it back online: shutdown abort; --startup mount; alte

  • Copy command for SQL*Plus

    Am trying to use the copy command in SQL*Plus to copy a table from an Oracle database to a local table on my machine in another format. Keep getting errors. It seems to contact the remote machine fine, but can't locate my local machine or figure out

  • Question about building xml-rpc client in swing

    Hi all, I'm going to build swing client for simple xml-rpc server, but I've little experience in swing. My application should create kind of XmlRpcClient object. It was no problem in console application, there was one client object and that's all. No

  • How to read and write in a binary file?

    Hi all, how can i search in a binary file for string and replace this string with another bin file ...test.bin search String "DE AD FA 01" regards gebi