File saving to a particular directory

hello guys
Im my GUI there is an option to save the data into a Random Access File, which works fine but i want all test data to stored in a particular folder coz at the moment its storing it in the folder its initialized in.
please help...
cheers

The java.io.File api is rich with possibilities. The one jumps out is the constructor that takes a directory and a file name. The cocs are your friends.

Similar Messages

  • Function Module To read all the Files in a Given UNIX directory.

    Can anyone provide me with a FUNCTION MODULE which reads all the files available in a UNIX directory?
    I have the UNIX directory given. I need to find all the files available in that particular Directory so that I can choose and process accordingly. Probably I can store all files in an Internal Table.
    Thanks in advance.
    Sunil

    Hi Nick,
    Thankyou very much for the response.
    The Function Module /SAPDMC/LSM_F4_SERVER_FILE is interactive wherein we can select only one file.
    But my requirement is I need to collect (probably in an internal table) all the files exixting in the given UNIX directory.
    Can you please find in that direction. I would be very grateful.
    Thanks.
    Sunil

  • Selecting a file to load from a directory

    With the current code the file path/ directory was already present. What im trying to do is add in a drop down menu that will allow the user to select one of the multiple files saved in the same directory/ folder to be loaded. Can anyone assist?
    Attachments:
    FILE SELECT 2.vi ‏13 KB

    Thank you for your reply. What im trying to do is while the program/ subvi is runing the user will select a file from the combo box/ drop down menu and hit load. This will select one of the multiple files in the directory and load it  into the rest of the program. This section of the code is to load the hardware device with list of numbers from the file that is selected. I only have 3 but it can be up to 200 files.

  • Urgent!doubt in upload the file to a particular directory.

    Hi
    Actually i'm developing a site using JSP.
    Main concept of the project is the user should be
    able to access his files or dabases from anywhere
    in the world thru internet via intranet.
    i've placed upload option in my site.
    each user should b given a separate directory.
    can anyone tell me how to make the user to store
    the file in a particular directory(the one alloted to him).
    And to view the file, if the user enters the file name
    it should open the file in the particular format.
    i need the coding since i'm new to jsp.
    can anyone help me or refer any site tht can solve
    my problem?
    thanx in advance.

    I'd just answered a similar case. I believe this is what you are looking for;
    <%@ page contentType="MIME-Type; Charset=Character-Set" %>
    Read up on MIME-Type and Character-Set for info.
    Here some exmaple;
    By default:
    <%@ page contentType="text.html; Charset=ISO-8859-1" %>
    Show an MS Excel file;
    <%@ page contentType="application/vnd.ms-excel" %>
    or
    <%
    String mimeType = "application/vnd.ms-excel"
    response.seContentType(mimeType);
    %>
    Cheers

  • TO READ FILES IN A PARTICULAR DIRECTORY FROM APPLICATION SERVER

    Hi all,
    Is there any function module which gives the list of files in a specific directory ??
    for eg ;i want to fetch all files in a particular directory say */interf/sy-mandt/reports....*
    I need a function module which will give all filenames in an internal table ,if i give the directory name as input.
    Thanks in advance,
    Aakash.
    Edited by: Aakash Neelaperumal on Apr 25, 2008 11:06 PM

    Hi,
    You can use WS_FILENAME_GET but understand it is obsolete. Search for a FM in function group SFES. I saw quite a few and one of them should meet your requirement.
    Cheers !

  • Tar extract file in particular directory excluding path stored in tar file

    In winzip you have chk box 'Use Foldername', if you uncheck it, all files will be extracted to path given in Extract to:
    Like winzip, do you have facility to extract files from tar file to a particular directory ignoring path stored in tar file.
    os - linux,unix
    regds

    Using -C <new_directory> options creates
    subdirectories under the new_directory as per path
    stored in tar file
    I just want to extract the files in the -C directory.
    e.g.
    # tar -tvf archive.tar
    -rw-r----- oracle/oinstall 4669440 2006-11-30
    13:23:02 /app/fmb/FORM1.fmb
    -rw-r----- oracle/oinstall 200704 2006-11-29
    10:18:25 /app/fmb/FORM2.fmb
    when i give following command
    tar -xvf archive.tar -C TargetDir
    creats subdirectory app/fmb in this TargetDir and
    then extract the files Forms1.fmb
    TargetDir/app/fmb/FORM1.fmb
    TargetDir/app/fmb/FORM2.fmb.
    where as i want FORM1.fmb and FORM2.fmb in TargetDir
    TargetDir/FORM1.fmb
    TargetDir/FORM2.fmb
    regdsit's include directory information when you run tar cvf.
    you can do the following action
    1. cd /app/fmb/
    2. tar cvf archive.tar *
    3. tar -xvf archive.tar -C TargetDir

  • Polling a particular directory, retrieving only new files

    Hi,
    I have a requirement of polling a particular directory, and retrieving all new files posted. Say, i have a file called file1 in a particular directory, i keep polling the same directory every "n" minutes or even seconds, and will try to fetch file1 only when there is a semaphore file called file1.ready exists for file1.
    This is in Solaris.
    How can this be implemented?. Any help will be greatly appreciated.
    Thanks

    Take a look at java.io.File which represents an abstract path such as a directory or file. You'll probably be particularly interested in File.exists().

  • Polling a particular directory, retrieve only new file(s)?

    Hi,
    I have a requirement of polling a particular directory, and retrieving all new files posted. Say, i have a file called file1 in a particular directory, i keep polling the same directory every "n" minutes or even seconds, and will try to fetch file1 only when there is a semaphore file called file1.ready exists for file1.
    This is in Solaris.
    How can this be implemented?. Any help will be greatly appreciated.
    Thanks

    you can use the file modified dates to figure out whats new and whats old.
    May be you can compare them against the last time that you ran the process.

  • Saving a file to a non-existing directory

    Hello all,
    I would like to know if it is possible to save a file to a non-existing directory using Java. I have a bad feeling that it's not possible, but if there is anyone out there who thinks otherwise, please tell me how it can be done.
    Thanks very much!
    Greetz Hans

    Hi,
    Of course you can create all you want.
    Try
              File fichier = new File(chemin);
              if ( ! fichier.exists()) {
                   // the path doesn't exist
                   ok = fichier.mkdirs();
    The mkdirs (with the s) can create the path in a recursive mode. See the File object's help
    Regards, JFB

  • Web.show_document calling .htm files saved on disk....

    Hi ,
    Is it possible to call .htm files saved on disk - let's say c:\my_htmFiles on AppServer/DevSuiteServer using the web.show_document form's built-in...????
    I have tried the following:
    web.show_document('c:\my_htmfiles\first.htm','_blank') and
    web.show_document('file://c:\my_htmfiles\first.htm','_blank')
    but whereas in the web browser's file->open both of them work.... in web.show_document do not....
    Is it possible to do it....?????
    Note: I use Dev10g
    Thanks....
    Sim

    I 'll try it of course.... but is it possible to define multiple directories down this virtual directory.....????
    Assuming that there is the following dir structure:
    C:\dev10gr2/tools/web/html
           |
           |--------------------------------------------/app1
                                                         |---------------/subdir1
                                                         |---------------/subdir2
           |--------------------------------------------/app2
           |--------------------------------------------/app3Is it possible to define multiple dirs ....????
    Is there any doc which describes it with examples.....?????
    Thanks.......
    Sim

  • Is there a way to list the contents of a particular directory?

    Hi,
    I'm creating the blue-print of a new iPad app and was wondering if there was a way to request the contents of a particular directory (eithre local to the device or a a particular directory on the web) and also get the "type" of each item.
    For example if inside a directory "Directory1" and inside that directory I have 4 files and another directory, (file1.gif, file2.txt, file3.mov, file4.mp3, Directory2)
    Is there a way to request the contents of Directory1 and the type of files they are?
    The ideal thing will be to get a recursive request and get an array of contents of all directories inside a particular directory.
    something like:
    Directory1[file1a.gif,file1b.txt,file1c.mov,file1d.mp3,[Directory2[file2b.mov,fi le2b.mp3]]]
    What I want is to create a navigation for the user based on the resultant strign.
    Am I re-inventing the wheel here?
    Any direction will be greatly appreciated. I rather adjust blue-print now based on what is possible.
    Thanks!

    We are users here. You might have better luck going to the developers forum.
    http://developer.apple.com/devforums/
    There are also links on that page that may help too.

  • Photoshop Elements 11 file saving proterties

    I am currently using Photoshop Elements 11 trail version to decide if I like it enough to upgrade.
    Yesterday, while saving my files - .jpg, .png, psd - etc - when I'd go to access the file to upload, it wouldn't recognize the file.
    Then when I went back into PSE 11 to open the file, it wouldn't recognize the file format, no matter what
    I have went ahead & uninstalled the program, then restarted my computer, reinstalled & it's doing the same thing.
    If this is a known issue, I certainly have no desire to upgrade. I use PSE 8 previously with zero problems.
    Please, if anyone can answer why this is happening, I'd really appreciate it.
    As for PSE 11 - I do feel, aside from this file saving issue, Adobe got so many things right - I love how PSE 11 has been changed, it's much easier to use, but this file issue, I don't have time for it when my clients are expecting turn around times from me.
    Thanks much!
    Tori

    Thank you for all your responses.
    First let me start off with, I am not new to saving files. I've been designing & saving files for over 10+ yrs. I've never ran into this problem with any program until using PSE 11. All my files were saving perfectly fine. This problem just started yesterday with PSE 11 for me. That's why I uninstalled, restarted & reinstalled with a restart after the install.
    When I go to save a file, these are my steps
    1. File
    2. Save as
    3. Name of the file (no characters - only using letters, maybe letters & numbers in combination together)
    4. I select what format I wish to save it in.
    5. Click save
    When I did this yesterday, my files were appearing to save, but actually, they were not saving no matter what format I was trying to save that as.
    How I found out this was happeneing - I went to upload a file to the web - I was then told the file was not a proper file format. I tried various things such as saving as a png, jpeg, tiff, gif - not of which were working. That's when I uninstalled PSE 11 & as said above, reinstalled, etc.
    Screen shot below shows what the icons ended up being - problem right there!
    What message I get when I try to open the file
    Message I get when I try to upload the file to the web
    This is WHY I feel this is a problem with the particular PSE 11 I'm using (downloaded directly from Adobe's site) It's a trial vertson. And I always try to try programs before I invest in them, no matter if they're $20 or $500
    I hope all this will help thos of you trying to answer this mystrey question for me. As I mentioned, I've never had this happen before.
    Today - it seems to be saving just fine..... and I haven't changed how I save files at all. If this is a known issue with PSE 11, I just wish to know so I don't waste my money on it. I love all the changes Adobe has made to PSE 11, but if it's full of bugs - I'd rather pass is all.
    Thanks so much once again!

  • PDF or Excel file saved to Network folder Intermittently has "Date Modified" changed to an older date

    Client saves files locally to her Win 7 64-bit laptop and they are fine when it comes to the date modifed stamp. On occasion a few of these files each day, when saved to the home directory on the server, get the Date Modified stamp changed. Time is never
    the same and can be set for las tweek or - literally - 1990, 2004, 2010, etc. I have seen tech articles talking about the different options for saving the file date based on an embedded image or attachment of some type, but that has been ruled out. And this
    is not the local saved file time being modified within the first minute or two of a locally copied file.
    Any ideas how a file saved to a network share can randomly and intermittently have the date modified to a much older date? Have scanned for malware as well.... Thanks!

    Hi
    Make sure the server or nas where it's saved is sync'ed with it,s time source, and be sure it's update for the OS's patch.
    Regards, Philippe
    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )
    Answer an interesting question ? Create a
    wiki article about it!

  • File Upload - When  is File saved in database

    Hi,
    I'm already using File Upload and Download in my application, which is working fine.
    Now I only need an information for better understanding.
    Is the file saved in the database table, when user selects the file from the file browse dialog or is it submitted when the user submits the page?
    Normally I'm using a lot of AJAX in my page, because of this I've no page process started on submit, I call javascript, that's calling processes on demand. Will my files be uploaded???
    Thanks
    chrissy

    Hello Chrissy,
    Never uploaded “regular” files into the db, only XML files, so I don’t have much experience working with BLOB, but please check if the following can help you - Re: Download an upload from Server directory
    In addition, Vikas wrote an application, which uploads CSV files directly into a table. The code can be downloaded in here - http://htmldb.oracle.com/pls/otn/f?p=38131:1
    >> I've found packages called WWV_FLOW_FILE_API and WWV_FLOW_FILE_MGR
    IMHO, you should try, as much as possible, to avoid using undocumented APEX internal packages, as they are subject to possible changes in future versions. If you can achieve your goals using public packages, and I’m pretty sure you can, it would be best.
    Hope this helps,
    Arie.

  • How can I encrypt a particular directory and not Home?

    I have a work iBook that I use for travel and I'd like to encrypt a particular directory instead of my whole Home directory. Can this be done? If so, how?
    If I NEED to use File Vault on my home directory, does this slow down non-work things like making DVDs, working with Photoshop, playing games, etc?
    What if I made another user, like Work, and used File Vault on that? I guess that would work, but could I access a file while I'm logged in as Home?
    Thanks,
    Tom

    >Re: 1: So, basically what I'm doing is creating another partition...but an encrypted partition, right?
    Not a partition, per se. While a disk image looks and acts like a partition in some respects (you can mount it at the desktop, copy files to/from it, etc.), it's actually just a file on disk, which means you can copy the disk image to another machine, open it up and get it's contents (password-protection notwithstanding, of course). Partitions cannot be moved from machine to machine (or from disk to disk)
    Also, if you create the disk image as a sparse image, it only takes up the amount of space consumed by the files within it. This means that if you create a 1GB image but only copy 100MB of data into it, it'll take up 100MB of space on disk (plus a little overhead). Compare that to a partition that will take 1GB on disk, even when it's empty.

Maybe you are looking for

  • Sending unix command with java

    Hi! I need to terminate program from server with "Ctrl+x" command. How do I send this kind of command to the server?

  • How to turn on iPad app setting?

    Hi, i'm trying to develop iPad apps in Flash but all I cannot figure out how to switch the publish method from iPhone app to iPad app.  In the iPhone OS publish setting I cannot find anything, and have searched everywhere. Thanks!! please get back to

  • Tables used in SAPI

    Hi Experts, I am posting this thread once again I came across a table named " I_T_DATA" in an user exit for enhancing the BC Data Source. Can anyone clarify me the following points: 1) Is I_T_DATA a standard tale used in Service API. 2) What are the

  • Wireless Card info - Is this the latest?

    Can upgrading the firmware on your MacBook Pro be updated? If so how? Is this the latest version for the MacBook Pro 15" 2009? Have there been problems with firmware on the wireless cards? Wireless Card Type: AirPort Extreme (0x168C, 0x87) Wireless C

  • IChat was great, now in 10.6 it is junk

    We use iChat often for video conference calls. We were able to have great results and consistent quality and speed, even for international chats. Now on 10.6 the audio quality is poor and choppy, the video hangs often, and the delay is very bad. We u