How to determine the file type in FTP

What command code that should be sent to FTP server in order to identify if
a given name (return from NLST command code) is a file, a folder, or even a link?
Any help is greately appreciated.
Thanks in advance,
ferdieabtik

user-exit for outbound COSMAS01
Idoc extension

Similar Messages

  • Mailexample.sql how do you determine the file type?

    I'm using the mailexample.sql which explains how to use the demo_mail wrapper package for utl_smtp. There's a procedure for attaching text files and a procedure for attaching binary files. I've got binary files to attach to email successfully.
    How can I determine the file type so that I can use the attach_text procedure when attaching text files rather than the procedure for attaching binary files?
    Sandy

    Watch out! I think there is a bug in that code :-
    bug with PL/SQL Sample - maildemo.sql
    To answer your question - the usual way of determining a file type is to look for 'magic numbers' in the file that indicate its type. For example, Windows exe files often (always?) begin with the two letters 'MZ'. Zip files begin with 'PK'; Rar archives begin with 'Rar!'. Text files can begin with anything, and do not have any characteristic marker, but USASCII7 (which is what the format that routine is designed for - I think), is a characterset that only uses the first 7 bits of the byte. You could read the file, and if you find any bytes > 127, then you know it is not a USASCII7 file. I have seen various programs that 'sample' the first 64 or 256 bytes of a file instead of reading the whole file, and they usually get it right.
    Hope this helps.
    Takmeister

  • [CS3][JS] How to get the file type of current document

    Hi,
    How to get the file type of current opening document (e.g., tif, jpeg, png) using JavaScript with Photoshop CS3.
    I am using file object the open the files one by one in the folder (the files sometimes don't have the extensions).
    If the current document is in tiff format then I need to convert to 8-bit, if its an Jpg image then needs to ignore the file.
    Regards,
    Karthik

    Do you really need to know the file type? What about just checking the bit depth?
    var doc = activeDocument;
    if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) {//Not 8 bit
    doc.bitsPerChannel = BitsPerChannelType.EIGHT;
    //do your save etc
    }else{
        //Ignore

  • How to open the file types of iOSApp(ipa),EPUBFile(.epub) in windows 7(32 bit)

    How to open the file types of iOSAPP(ipa),EPUBfile(.epub) in windows 7(32 bit)

    iOS apps can be added to an iTunes library and thereafter transferred to an iOS device. They cannot be opened directly on a PC.
    epub files can be added to an iTunes library, and thereafter transferred to an iOS device where they can be read with the iBooks application. Files protected with Apple's DRM cannot be opened directly on a PC, though there are programs such as Kindle and Calibre that will open non-protected epub files.
    tt2

  • How to change the file type from IMOVIE PROJECT to other types of file

    how to change the file type from IMOVIE PROJECT to other types of file??
    thank you very much for your help=]

    I am not sure what you mean, but once you make a project. Then go to the share menu and you can export the project to iDVD, itunes, mobileme, quicktime.
    Share export quicktime movie will allow you to export to a variety of codecs. What specific export are you looking to share the movie in? What is the final source that the movie will be displayed?

  • How to find the file type without the file extension using indesign javascript (.jsx)

    hi,
    How to identify the file type (eg: InDesign or Quark) without knowing their file type. How can we find what kind of file is that??? without their extension like ('.indd','.qxd') before import to the document...

    Hi subha_oviya,
    Take a look at the file filtering section in the InDesign CS3 sample script ImageCatalog.jsx to see how to look for file types. I'm assuming that you're using InDesign CS3, and that you're using the Mac OS--you didn't say.
    Thanks,
    Ole

  • How to determine the file system on Solaris

    Friends,
    How to determine which file system I have installed UFS or ZFS on Solaris
    Thanks

    Other methods would include looking at the /etc/vfstab if it's in there or fstyp(1M):
    System Administration Commands fstyp(1M)
    NAME
    fstyp - determine file system type
    SYNOPSIS
    fstyp [-a | -v] special [:logical-drive]

  • How to identify the file type in a safe way

    I need to identify the filetype of a file in my disc.
    I watched over internet and i've found this good site:
    http://filext.com/
    that supplys the "magic bytes" for many kind of files.
    I have also looked over internet for some ready class that identify different file types, and I have found FFident:
    http://schmidt.devlib.org/ffident/index.html
    Do you know any other Java package/class that is able to identify correctly the file types?
    Thank you,.

    The OS just watch the extension of the file.Not always. If you create a word doc but name it with
    some other extension, the OS still can determine that
    it is a word doc.On which OS?
    if i take foo.exe and i rename foo.doc so my OSwill
    try to open it as a MS Word Document.Again, garbage in, garbage out.What you mean?
    If I create a MS Word Document for a file .doc that is not a real .doc and it is not able to read, i will just lose cpu time and a lot of memory.
    So it is important to understand if I need really to open MS Word watching what is the real file type
    Either way, you're going to be doing way too much
    work (and wheel-reinventing) if you're going to build
    your own detection scheme.In the SDK there is not any file type checker, and if eventually really exists an OS like you say that is able to read inside the file, i prefer to have my own Java class that do that work in a safe and opensource way.
    However in my first post i've given a site with some java code that do what I need, i just was asking if anyone know if there is any ready-to-work java class that is better for doing this work.

  • How to filter the file type and size when uploadind files into APEX

    Hi,
    I was wondering how I can do to validate the size of a file, before moving it to my table ? I'd like to filter the file type, but for this one, I think I can use regular expressions in a validation process.
    I don't know if there is a way to read the file size even before sending it into the temporary file table.
    Thank you
    Leinad

    Hello Leinad,
    AFAIK, you have to create an APEX validation (PL/SQL returns Boolean or Returns error text), which will query the file details from apex_flow_files table. Here you can get filetype and size etc.
    So just validate and if any validation fails, then delete the file from apex_flow_files and riase error message.
    Regards,
    Hari
    P.S. Please note that, if there are other apex validations on your page and if they fail, still apex will load the file into apex_flow_files table. So it's good idea to create a validation (PL/SQL) which will fire (condition) when inline validation errors occured. Make sure that this is the LAST validation on your page in sequence. And here you can write code to delete the file from apex_flow_files table.
    Edited by: Hari_639 on Sep 20, 2012 10:09 PM

  • How to determine the data type of  a text field

    hi,
    I have a text field, now i need to know what data type i have given?
    it may be numerical, string, date & boolean data type. when i write something after that it will determine the data type of the input text? is it possible in jsp? Is there anyone who can help me about this? Please help me
    With regards
    Bina

    javascript:
    function test(sample){
          if(sample==true || sample==false){
           alert('boolean')
          }else if(isNaN(sample)){
           alert('number')
          }else{
          alert('string')
        }

  • How to determine the MIME types of the files?

    I'm making an application, in which I've to upload the files to the database. Now I want to insert into the database the MIME type of the files. Now how can I know that which type of the file is having which MIME type?
    where can I get the list of all supported MIME types?
    Even if I get the list, then every time I update the file in the database, so every time I have to check the file extension and then insert the MIME type...
    this seems to be a tedioius job..
    Is there any simple way to do this?

    I could ask "supported by what?" but I assume you will
    be the one supporting them. Here's a link to the
    latest list of registered MIME types.HERE's the link...
    ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types

  • How to determine the transaction type?

    Hello,
    I have a requirement to disable the user when the role string field on the usr form is empty. I set up a post update entity adapter to do that and it works fine.
    When I want to enable the user using the Enable button, the above post update entity adapter detects that the role string field is empty and the user is Active, it disables the user right back.
    So, I need to set up a pre-update entity adapter that can detect the type of transaction. If the transaction is to Enable the Xellerate User, then I will update the role string to a dummy value (as long as it's not empty) so that the Disable adapter doesn't get fired.
    Is this possible to do? Where can I find the transaction type information for a given Object?
    Thanks
    Khanh

    Thanks
    This is the information that i got :
    java version "1.4.2_07"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07
    Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
    from this i could make out that the jvm is client version,, but how do i determine which vendor has provided the jvm .

  • How to limit the file types to be uploaded to KM folders?

    We need to restrict files uploaded to KM to the following types: *.pdf, *.doc, *.ppt, and *.xls.  Uploading the other file types will need to give user an error message. 
    1) Is there a configuration to satisfy this requirement?
    2) If not, what is the work-around? How to we achive this goal?       
    For example:
    1. Go to u2018Private Documents and Discussionsu2019 hyper link.
    2. Click on Owner.
    3. Click on 'Send E-mail' hyperlink
    4. Click on the 'Browse' button, selects a file (with .exe extension)
    5. Click on 'Open' button and 'Upload' button (would like to give user an error message at this point)
    Thank you so much for your help.  I have searched the forum but did not find any specific answers to this issue.

    Hello,
    I have the same problem, unfortunatelly there's no standard way to do this and developing
    custom repository services or upload commands may not attend totally my requirements.
    An idea is to create FSDB CM Repositories or to map external File System repositories for
    specifics needs, so once the documents are stored into a file system (windows in my case)
    it's simple to implement the organization's policy, be it file types, maximum folder size, clean-up routines, etc..
    However there are pros and cons, some services are not available and there are some restrictions,
    here's more detailed information: http://help.sap.com/saphelp_nw04/helpdata/en/62/468698a8e611d5993600508b6b8b11/frameset.htm
    As for the original folders on DB mode, we've been running KM detailed reports once a week
    and deleting the "illegal" files found
    kind regards,
    Rafael

  • How to get the File-Type from a BLOB-Column

    Hi all,
    I have the database table with the BLOB-Column. In this column are Word/Pdf/Excel/... files can be stored.
    Now I want to open these Files from Webforms.
    I can download the file from database to the client and then open the file with client_ole2.CREATE_OBJ('Word.Application');
    But I can not be sure that the file is a Word-Document.
    How can I know which application is saved in the BLOB-column?
    Regards

    Hi Francois,
    thank you.
    Unfortunatelly I do not know the interMedia functions. Can you send me an example with interMedia?
    I am working with your solution with WEBUTIL_HOST.blocking.
    But when I do not give the extension for the file, in that the BLOB will be temporary stored, I get to see the Windows "Select Program..." window. When I select Word or anything else then the file will be opened, but the locking does not working.
    Any ideas?
    Regards

  • How to determine the object type?

    Hi,
    I got a method that is of the following signature:
    Object result = method.invoke(object,args);The result can be any type from primitive types like double to class type.
    How can I determine whether the result object is of what type?
    I am thinking of using
    (if result instanceof Double)
          //do something
    }However, the method call invoke can return a primitive type double, so will the above method
    (if result instanceodf Double) be called?
    Thanks.

    However, the method call invoke can return a primitive
    type double, so will the above method
    (if result instanceodf Double) be called?(result instanceof Double) will be true because quoting the javadocs for Method.invoke(): "if the value has a primitive type, it is first appropriately wrapped in an object."
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Method.html#invoke(java.lang.Object,%20java.lang.Object[])

Maybe you are looking for