How to extract the size and date from a given file

Hi,
I want to extract the size and date of a file (it can be either a video, audio or text file) that the user points to the location of. But I am not sure how. Does Java have an api that can do this? If not is there some other way of doing this? Can anyone help? Thanks in advance.

Have a look at java.io.File, specifically
public long lastModified()
This format returned (I find) is nasty, so then use java.util.Date (or java.sql.Date, look the same on the surface to me) to format it.
Cheers,
Radish21

Similar Messages

  • How to track the flow of data from R/2 to BI ?

    Hi Experts,
    Question: How to track the flow of data from R/3 to BI ?
    I want to load master data from R/3 to BI. In BI, i create an infopackage to load data from R/3. Under processing tab i set it as "PSA and then in the InfoObject (package by package)". Its a Full update.
    Now, i start the update to InfoObject. The load goes on well.
    Now, i want to track the flow of data from the master data table in R/3 to Datasource in R/3 then Extractors and then in the PSA in BI and then till the InfoObject. That is the complete flow of data from source table (in R/3) to Target table (in BI).
    Please help me know how this can be done. (For example lets take cost element master data)
    Regards,
    Suraj S Nair

    Hi,
    Data flow :
    BW :
    When u right click on the Master Data Info object -> Select Data flow.Then  it will  show u the details like DS name,IS (If 3.x)
    Once u know the DS then you need to find out the source tables for the R/3 DS.This information will get using ROOSOURCE or ROOSFIELD tables  or help.sap.com.
    My suggestion better to search in Help site for DS source tables.
    DS Tables :
    The following link will provide you the source tables for some of the LO DS.
    https://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Dec 22, 2009 9:29 AM

  • How to Send the material master data from sap4.6c to ECC6.0

    Hi
        Friends this is shalini Shah, i got one requirement that is
    how to send the materail master data  from SAP 4.6C to ECC6.0 using XI.
    i  know the file to idoc and idoc to file scenarios but i don't know this one.
    please help me friends, Thanks in advance.
    Regards
    Shalini Shah

    Hi Shalini,
    To trigger IDoc these configurations should be done in the SAP 4.6, XI and ECC 6.0.
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3 (4.6 and ECC 6.0)
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    Also go ther the Blog <a href="/people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi Configuration for Pushing IDOC's from SAP to XI</a> By Swaroopa Vishwanath
    U need to import the IDoc types both inbound and outbound to XI.
    1. Create Inbound and Outbound Message interface.
    2. Do one to one message mapping.
    3. Define an Interface mapping.
    ID:
    1. Create 1 Sender aggrement.
    2. Create 1 Receiver aggrement.
    3. Define 1 RD and ID.
    4. Only create an receiver IDoc CC.
    Regards
    San
    <a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
    Where There is a <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/16">blog</a> there is a Way.

  • HT5624 I have an expired email account linked to icloud and don't know the password and can't reset the password due to not receiving emails anymore with the email account. Any ideas on how to retrieve the songs and data?

    I have an icloud account linked to an email address that is no longer in service.  I do not have the password for the account and am trying to retrieve the songs and data from the cloud to use on new apple device.  Any way to get a new password, able to open the expired account, without having that email account active?

    Hi there clarethasimmons,
    You may find the information in the article below helpful.
    Apple ID: Changing your Apple ID
    http://support.apple.com/kb/ht5621
    -Griff W.

  • How to extract the actual XML document from soap message?

    My problem is " how to extract the actual XML document from soap message? "
    i just want to extract the attachment i.e. (pure XML document without any soap header or envolope).
    i could be ver thank full if u could solve my problem.
    [email protected]

    Hi,
    This is some skeleton code for extracting an attachment from a SOAPMessage.
    import javax.activation.DataHandler.;
    import javax.xml.soap.*;
    import javax.xml.message.*;
    Iterator allAttachments = message.getAttachments();
    AttachmentPart ap1 = null;
    while(allAttachments.hasNext()){
    ap1 = (AttachmentPart)allAttachments.next();
    //Check that the attachment is correct one. By looking at its mime headers
    //Convert the attachment part into its DOM representation:
    if(ap1.getContentType() == "text/xml"){
    //Use the activation dataHandler class to extract the content, then create a StreamSource from
    //the content.
    DataHandler attachmentContent = ap1.getDataHandler();
    StreamSource attachmentStream = new StreamSource(attachmentContent.getInputStream());
    DOMResult domAttachment = getDOMResult(attachmentStream);
    domAttachment holds an xml representation of the attachment.
    Hope this helps.

  • I had a trouble with my lap top and had to format hard disk and install all soft ware again. could any body tell me how to transfer the application and data in my i phone back to my laptop.

    I had a trouble with my lap top and had to format hard disk and install all soft ware again. could any body tell me how to transfer the application and data in my i phone back to itune.

    You can't. It still thinks that your iPhone is synced with another iTunes library (the one that you had before you reformatted the hard drive.

  • How to avoid the Amount and Date values for VOID Cheques

    Hi All,
    I had created a two window i.e For Amount and Date. If I process the cheque the Amount value and Date should not trigger for VOID CHEQUES.
    Can any one tel me how to avoid the Amount and Date values for VOID Cheques
    Your help will be greatly appreciated.
    Regards
    Yathish

    Hi,
    I dont know which tablel you are referring to, is it PAYR table and the field VOIDR?
    If a cheque is voided, it would have a reason and it is stored in VOIDR field of this PAYR table.
    Check if the field VOIDR is filled, if it is filled, do not print the amount and date.
    Regards
    Subramanian

  • How to Maintain the MM Master Data from one company code to other co code

    Hi Experts,
    Can any one pls tell me how to Maintain the MM Master Data from one company code to other co code.
    Presently we created New plants,New Purchase Orgs under different company code.
    1) Material Master data
    2) Vendor MAster data
    3) PIR
    4) Source List
    Is there any standard Transactions...??
    Please reply.
    Brgds,
    KK

    Hi
    Check out the link -
    http://wiki.sdn.sap.com/wiki/display/ABAP/StepstocreateasimpleLSMWusingbatchinput+recording
    lsmw for data migration for  xk01 transaction
    http://www.sap-img.com/general/lsmw-steps-for-data-migration.htm
    Regards
    Anand

  • How to sync the apps and music from my iphone to my itouch

    How to sync the apps and music from my iphone to my itouch

    You have to transfer/get the apps and music from the iPhone into iTunes on your computer and sync them to the iPod.  You transfer iTunes purchases by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer

  • How to determine the Country and Organization from IP

    Hi,
    I would like to determine the Country and Organization from a given IP. I have to write a JSP, which when given the IP address gives the country and the organization to which the IP belongs. The organization may be the ISP, or a MNC or any other corporate/government body, or it may be of an individual. I have to do it progamitically from inside a JSP?
    Any suggestions anybody
    Thanks in Advance for your reply

    even when tracking IP's, if it is static you can narrow it down pretty far - if it's dynamic, you can only narrow it down to a specific part of the country.

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How to know the size of data in some columns of a table?

    Hi,
    How can the size of of data for some specified column be determined?
    For example : TableA has 20 columns and the size of table is 20 GB. I want to know the size of data kept in last four columns.
    Thanks in Advance,
    Vishu

    You could use vsize to determine the size of a column element and sum them upselect sum(vsize(column_of_interest)) from whatever_table;

  • How to know the time and date when someone empty trash?

    someone delete very important videos on my mac PC , i need to know the time and date of what happens on my pc for 2 days ago to can know who delete these files and when the trash being empty
    also, i tried very hard to recovery these videos by using Data rescue program but i found old videos instead of the last videos hasa been removed??? i don't know how???!!
    so can anyone help me please

    Open the Console app located in HD > Applications > Utilities
    Select System Log on the left.
    Type trash in the search fileld top right corner of that window.
    That should reveal the date and name of the file or files that were deleted but they cannot be extracted from there.

  • How to transport the CO and DATA file to SAP system

    Hello Experts ,
                          I want to know the procedure to import a transport request into an isolated SAP system ( which is not in the transport route ) using the CO and DATA files .
    I know that user should have adminstrator role to do this but i dont know how to do this .
    Regards
    Vivek

    Simply copy the source cofile and datafile from the source system to the target system and then import.
    Data file is located at /usr/sap/trans/<sid>/data with format R<transport_number>.<sid> and cofile is located at /usr/sap/trans/<sid>/cofile with format K<transport_number>.<sid>
    Copy them to the same location on the target system and then go to STMS -> Extras -> Add -> insert the name of the transport in format <sid>K<transport_number>, this will add the transport to the import queue then just simply import the transport.
    Regards
    Juan

  • Due to reinstallation of mac 2nd partition is nt showing how to recover the partition and data

    Due to reinstallation of mac 2nd partition is nt showing how to recover the partition and data

    If you have no backup your only option is to perform incomplete recovery (point-in-time recovery) to the time just before the drop, export the table and then restore the database (for example, from a cold backup taken just before the incomplete recovery,) and import the table. This obviously requires a full backup
    taken before the drop which you don't seem to have, so the answer is "regrettably no."
    If you have a backup;
    Take backup of ur current db, apply previous day backup, do point in time recovery to get table back,export table, shutdown and apply latest backup, import table back
    Regards,

Maybe you are looking for