Finding current directory location of file

Hi All,
i want to know how to find out the directory path of the given file.when i am using the below code i am getting path where our program running.i.e.c://windows/system32.
File f=new File(".");
f.getAbsolutePath();
i want to know the path of file where it exactly resides.
thanks in advance.If anybody knows please help me.

the given fileIs the given file named: . (a single dot)?
What happens when you use a valid filename?
A method of the Class file wil return a URL to the class file that is executing.

Similar Messages

  • Acrobat Pro "save as" function in the file menu does not show the current directory of the file

    I have installed CC but Acrobat Pro gives me headaches.
    The "save as" function in the file menu does not show the current directory of the file but something I have worked on in the past.
    It forces me to navigates through my hard disk for this very straightforward thing in normal conditions. I precise: Acrobat is the only software reacting like that.
    I use Windows7 professional 64bits.

    I use what seems to be the latest version available on the Cloud:
    To illustrate my point, I open a directory with explorer and double-click on the only PDF in there:
    So here it is, open:
    When I do a "Save as", it takes me to a totally different place on the disk!
    Very annoying...
    Thanks for your time!
    JJ

  • Fastest? Relocate Masters or Finder move with Locate referenced files

    I have maxed out the 2 x 1TB drives in my MP dedicated to referenced masters, and I'm about to consolidate them onto a new 2 x 2TB drive setup. My question is which is the fastest solution for moving 1.5 TB of images on my current setup onto one of the new 2TB drives.
    FYI, the new HDD is now connected via eSATA to an external housing, with write speeds of around 100 MB/sec. Once all data is transferred and relinked, I'll open the case and swap out the new drives internally for the old 1TB ones.
    Is it fastest to?
    1. Use Aperture's "Relocate Masters" fucntion. My question is how much extra overhead is involved with doing this via Aperture?
    2. Do a Finder copy of the files, then once they are moved open Aperture and use the "Locate Referenced Files" to reconnect the images to the new HDD.
    Has anyone done any speed tests on this? I have about 80,000 refernced images, so I'd like to cut the file transfer time down as much as possible.

    Select a batch of images, and go into +Locate Referenced Files+ - just the same as doing one at a time. Match up one image from your batch with the file and then, instead of hitting the <Reconnect> button, hit the <Reconnect All> button.
    Do a small batch initial until you get the hang of it, and then make a bigger selection and go and have a cup of tea...
    Here's an [earlier description|http://discussions.apple.com/message.jspa?messageID=11334896#113348 96] I gave of this process with some background details of how I handled it first time around.
    Hope this helps.
    Regards,
    Gary

  • Specifying current directory in Receiver File Adapter

    Hi Experts,
    I have been configuring a receiver file adapter to place a file onto an FTP server. As per the information provided, as soon as I login to the FTP server, I have to place the file in current logged in directory. In this case, how can I mention this in file adapter as to use the current directory path to place the file? What should I enter in 'Target Directory' in File Access Parameters?
    Thanks,
    Dhawal

    Hi Praveen,
    Since file directory parameter is mandatory, my question is what should I enter in this parameter so that the file adapter will know that the file should be placed in the root directory itself?
    Regards,
    Dhawal

  • Finding the directory of selected files

    I have selected files in the following manner
    set new_file to (choose file with prompt "Choose files to save as PDF files.:" with multiple selections allowed)
    What I now need the the path of the folder these files came from but am not having any luck with this. Thanks if anyone can help.

    You can ask Finder for any item's container, which in this case would be a folder:
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">set new_file to (choose file with prompt "Choose files to save as PDF files.:" with multiple selections allowed)
    tell application "Finder" to set new_folder to the container of first item of new_file</pre>

  • Why does finder path not locate my file?

    I have a jpeg on my desktop named keats, 
    keats.jpg however the file extension is hidden.
    I`m trying to learn to search path urls in mac & finder.
    I typed this but it says "folder can`t be found."
    ~/Users/myname/Desktop/keats.jpg
    I also tried it with just keats at the end (no .jpg)

    You're going to hate yourself.
    The function is "Go To Folder" NOT "Go To File"

  • Getting current directory for JFileChooser

    I'm trying to construct a JFileChooser that uses the current directory as its view (and not the default Windows "My Documents" directory path). How can I get the current directory path? File definately doesn't have anything, Toolkit neither.

    I had the same exact question a while ago. The solution is quite simple.
    JFileChooser j = new JFileChooser(".");

  • Ctxload can't find a file in the current directory

    I am trying to load a thesaurus file using ctxload. The file is in the current directory. I can use a text editor to modify it. But ctxload always complains that "file not found." Why?

    I have the latest iTunes version and haven't seen that feature.
    From the iTunes menu bar you will find it at iTunes>Provide iTunes Feedback.
    It is also on the main iPod +iTunes page. Click on the iPod + iTunes tab at the top of this page and look near the bottom, its in small type with a pencil icon next to it.
    Hope this helps.
    bd

  • How can I make an applet look to the current directory to read a txt file in?

    I am using a File class passing only the file name as the contructor but forte still looks in "C:\forte_jdk\forte4j\bin\Events.txt" which is not my current directory for the project.
    If leave it and ftp this applet to my web site I get an IOException.

    I always find visual aids helpful. See below for screenshots & discriptions.
    01. The Basics
    When you create a new site & go into design view (in the example below it's the Home page), you'll see the following.
    The white box is your page.
    The grey box outside of that is your browser area.
    The black & white checkered area is the Adobe Muse CC application chrome.
    02. Add Box
    Draw / Add your rectangle or text frame (text tool). I drew a rectangle, gave it a fill color of blue & turned the stroke from 1 to 0.
    03. Extend & Snap to Browser Edge (Left)
    Click, hold  and drag your mouse on the center adorner (adorner is the little squares that you can grab to resize your rectangle) until you resize your rectangle to the browser edge (the dark grey area) until you see a red line. This means you've 'snapped' one of the rectangle's edge to the browser edge.
    04. Extend & Snap to Browser Edge (Right)
    Repeat the process except do this for the right edge. In truth, it doesn't matter in which order you resize your rectangle to snap to the browser edges. The key thing is to be sure to do this for both sides of the rectangle & snap it to the browser edge (see the red line).
    05. You're done! Preview.
    06. Bonus!
    Once again, you can make rectangles or text frames 100% width, BUT you can't do this with placed images.
    However, you can do this with a rectangle or text frame. Then set the Fill of either the rectangle & text frame to be an Image & set the Fitting to 'Scale to Fill.'
    (see below for example - I used a rectangle & changed it's Fill property)
    Now when I preview, the image is 100% width. In truth, it's a 100% width rectangle with a fill of an image.

  • How to read files from current directory for applet

    I have an applet that needs to read some audio files located in its current directory on the server and I just can't seem to figure it out...maybe I am being dumb...any help?

    You can use the ListSorter File Adapter Configuration property to sort based on timestamp. Basically add the following property to the inbound JCA file:
    <property name="ListSorter"
    value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>
    <property name="SingleThreadModel" value="true"/>
    More info see section 4.2.6 in http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm

  • Hi, using iphoto 6, i suddenly lost albums: they are still in the directory, but no pictures in some albums.Using finder, I can locate the pictures and even get preview. But impossible to import them. Anyone can help? thanks

    Hi, using iphoto 6, i suddenly lost albums: they are still in the directory, but no pictures in some albums.Using finder, I can locate the pictures and even get preview. But impossible to import them. Anyone can help? thanks

    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library allowing it to overwrite the damaged file.
    2. Download <a href="http://www.fatcatsoftware.com/iplm/"><b><u>iPhoto Library Manager</b></u></a> and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new *iPhoto 6* library:
    Note this will give you a working library with the same Rolls and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library on your desktop and find the Originals folder. From the Originals folder drag the individual Roll Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.

  • Delete logs or trace file in current directory

    how to delete before 5 days trace files or alert log in the current directory.

    Syntax
    find /path -name '*.trc' -mtime +days -exec command {} \;
    Example
    find /backup -name '*.log' -mtime +5 -exec ls -ltr {} \;
    find /backup -name '*.trc' -mtime +5 -exec ls -ltr {} \;
    find /backup -name '*.log' -mtime +5 -exec rm -rf {} \;
    find /backup -name '*.trc' -mtime +5 -exec rm -rf {} \;
    Edited by: hitgon on Jun 26, 2012 9:44 AM

  • Find Tax Return Locations for all Accounting needs, File Tax return......

    Hi dear friends
    Find Tax Return Locations for all Accounting needs, File Tax return, Business Accounting, Payroll, Income Tax, Property Tax, State Tax.
    Find a qualified local Tax Professional, CPA, Accounting Firm,  Accountant, Financial Planning from most widely used Directory.
    Our services are -- irs tax help, accounting, taxes, irs, tax debt help, payroll, income tax, property tax, tax attorney, tax, cpa, accountants, tax help, tax return, business tax return, free tax help, estate tax,
    More information visit below here --
    [FINDTAXRETURN|http://www.findtaxreturn.com/]
    Cheers
    Admin

    I have already received the TT application for 2012 filing.
    Have you checked at their website?
    http://www.turbotax.com/lp/ty11/ppc/hp.jsp?cid=ppc_gg_b_stan_dk_us_hv-trbtx-mn&a did=18494275668&skw=TurboTax&kw=turbotax&ven=gg&

  • Find Tax Return Locations for all Accounting needs, File Tax return, Busine

    Hi dear friends
    Find Tax Return Locations for all Accounting needs, File Tax return, Business Accounting, Payroll, Income Tax, Property Tax, State Tax.
    Find a qualified local Tax Professional, CPA, Accounting Firm,  Accountant, Financial Planning from most widely used Directory.
    Our services are -- irs tax help, accounting, taxes, irs, tax debt help, payroll, income tax, property tax, tax attorney, tax, cpa, accountants, tax help, tax return, business tax return, free tax help, estate tax,
    More information visit below here --
    [FINDTAXRETURN|http://www.findtaxreturn.com/]
    Cheers:)
    Admin:)

    I have already received the TT application for 2012 filing.
    Have you checked at their website?
    http://www.turbotax.com/lp/ty11/ppc/hp.jsp?cid=ppc_gg_b_stan_dk_us_hv-trbtx-mn&a did=18494275668&skw=TurboTax&kw=turbotax&ven=gg&

  • Hi, Need help. I am trying to download the latest iTunes for Windows application but on running the program it says that it can not be completed as it can not find the folder location of the file "iTunes.msi" . Any clues would be appreciated

    Hi, Need help. I am trying to download the latest iTunes for Windows application but on running the program it says that it can not be completed as it can not find the folder location of the file "iTunes.msi" . Any clues would be appreciated

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for

  • Applications  open, have menus, but no windows

    officially the weirdest bug I've ever had on a mac... When my computer is on for a period of time, parts of iTunes stop working. The library window is just gone.... The little "iTunes is loading your library" appears when I quit and relaunch the appl

  • Breakpoints not working when debugging OC4J web service

    I am attempting to debug the PL/SQL web service autogenerated as part of the EMP_FETCHER tutorial example. My code has been compiled with debug information and the classes I wish to debug are not in my exclusions list. When using the embedded OC4J co

  • Unable to get h:datatable working

    I am trying to use datatable tag. I am iterating over an array of objects. <h:dataTable value='#{someBean.items}' var='item'/> <h:column>      <h:inputText size="20" id="label" styleClass="data" value='#{item.label}' required="true">      </h:inputTe

  • C3-00 Compatibility with mac?

    New phone.. please tell me it's not a dud, 1. I've paired it with my laptop via bluetooth 2. I've synced it with the server Nokia website but it won't put my music on 3. I want maps but the website says I can only do it with a pc 4.I want a cool ring

  • Windows installer error 1722

    Showing error while installing wireless button drive . Error  1722 windows installer. Tried all the things that are posted in microsoft site but no effect. Pls help