Return the path of a created folder

hi all, this is a simple code to create a directory. but looks like im having some problem when i tried to return the path of the created folder. used boolean and boolean cant be referenced. duh. need help. is there any other alternative?
public void createDir() {
         // Create a directory; all ancestor directories must exist
         boolean success = (new File("../kam")).mkdir();
         System.out.println(""+success.getName());
         if (!success) {
        // Directory creation failed
     }thx in advance
Yati

public void createDir() {
     // Create a directory; all ancestor directories must exist
File file=(new File("../kam"))
     boolean success = file.mkdir();
     if(Success)
     System.out.println(""+file.getName());
else
// Directory creation failed

Similar Messages

  • Returning the file count of a folder--too slow

    I am using the following to return the file count of a folder as part of a larger script
    with timeout of 5000 seconds
    tell application "Finder"
    set origFolder to "Somefolder" as alias
    set thePivotfiles to (every file of origFolder whose name ends with ".jpg")
    return the count of thePivotfiles
    end tell
    end timeout
    This script is rather slow to return the count of thePivotfiles--there are about 15,000 image files in the folder.
    Is there a faster way for the script to do this?
    Thanks.
    Pedro

    try using a shell script, something like :
    do shell script "cd ~/SomeFolder; ls -a | wc -l"
    more info here: http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    .... btw, this is the Final Cut Pro forum. :/

  • The installer can't create folder "var/folders/51/tm_411z090hj6l9r0c8lr4m000gn/T/install.374wan2oR".

    the installer can't create folder "var/folders/51/tm_411z090hj6l9r0c8lr4m000gn/T/install.374wan2oR".
    during FCS installation

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output andWi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Vs2010 azure project remove instead of unload now cannot find a part of the path build error

    I know this isn't a vs online question but I wasn't sure where else to post this one...
    I have an azure project built in vs2010 with a web role and worker role project. I accidently removed the worker role project then re added through 'add existing project'. Now when I try and build I get
    Error 1   Could not find a part of the path 'C:\Users\Mat\Documents\Visual Studio 2010\Projects\MvcApplication7 - Copy (4)\CubeCloud1.Azure\WorkerRole1\'.    C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure
    Tools\1.8\Microsoft.WindowsAzure.targets    987 5   CubeCloud1.Azure
    Line 987 is the start of the  element.
    Looking at the path, the folder WorkerRole1 doesn't exist but looking at back ups of this project it doesn't exist in them either.
    I've tried adding the WorkerRole1 folder but then I get  Error 102 CloudServices38 : The entrypoint dll is not defined for worker role WorkerRole1.    C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.8\Microsoft.WindowsAzure.targets   
    987 5   CubeCloud1.Azure
    I'm not sure going down the path of adding this folder anyway is the correct solution (I could be wrong of course).
    thanks,

    I don't know why this worked but I made a copy of the solution. When I opened the solution it had lost a reference to one dll (Windows Storage I think). I added that, then it builds ok now.

  • Azure project remove instead of unload now cannot find a part of the path build error

    I have an azure project built in vs2010 with a web role and worker role project. I accidently removed the worker role project then re added through 'add existing project'. Now when I try and build I get
    Error 1   Could not find a part of the path 'C:\Users\Mat\Documents\Visual Studio 2010\Projects\MvcApplication7 - Copy (4)\CubeCloud1.Azure\WorkerRole1\'.    C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure
    Tools\1.8\Microsoft.WindowsAzure.targets    987 5   CubeCloud1.Azure
    Line 987 is the start of the  element.
    Looking at the path, the folder WorkerRole1 doesn't exist but looking at back ups of this project it doesn't exist in them either.
    I've tried adding the WorkerRole1 folder but then I get  Error 102 CloudServices38 : The entrypoint dll is not defined for worker role WorkerRole1.    C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.8\Microsoft.WindowsAzure.targets   
    987 5   CubeCloud1.Azure
    I'm not sure going down the path of adding this folder anyway is the correct solution (I could be wrong of course).
    thanks,

    Hi mattech13,
    Thank you for posting in MSDN forum.
    According to your description, it seems that you have solved this issue now.
    Since
    this forum is to discuss: Visual
    Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    Based
    on your issue,
    it is related to the Azure, so we will move this case to the Azure forum:https://social.msdn.microsoft.com/forums/azure/en-US/home?category=windowsazureplatform
    In addition, if
    you have any issues about this azure,I
    suggest you can post this issue directly to the Azure forum, you will get better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get the path of DIR_HOME?

    Hi all,
    In transaction AL11 there are several paths for SAP-directories. One of them is DIR_HOME. This path can vary from system to system.
    Is there a function or command or such which can be called from an ABAP program and return the path of DIR_HOME?
    Thanks in advance,
    Ioana

    Hi Ioana,
    try this code:
    report ZTEST.                               
    data h_path(75) type c.                     
    call 'C_SAPGPARAM' id 'NAME'  field 'DIR_HOME' 
                       id 'VALUE' field h_path.                                                                               
    write: / 'DIR_HOME:', h_path.
    Regard,
    Dirk

  • How to retrieve the path of the browser position?

    Hi,
    Id like to retrieve the path from the browser into a String.
    I need it to check for forbidden file-types ( like direct access to my jsp-files ).
    i tried
    String path = processPath(request, response);
    But it only returns the path of my application.
    can somebody help please?

    Hi,
    Id like to retrieve the path from the browser into a
    String.
    I need it to check for forbidden file-types ( like
    direct access to my jsp-files ).
    i tried
    String path = processPath(request, response);
    But it only returns the path of my application.
    can somebody help please?See here (double post)
    http://forum.java.sun.com/thread.jspa?threadID=5195765&tstart=0
    also, beware that processPath() is a method from the struts framework

  • How to check if the path exists and if not, create it

    I'm trying to check if the path given by the user already exists. In case it doesn't, I'd like to create a folder with name given in the same directory.
    Let's say path_1: "C:\folder1" and path_2: "C:\folder2", and suppose that folder1 exists but folder2 doesn't. Then if the path given by the user is the path_1, then ok, nothing happens, but if it is the path_2, then the programm should realize that it doesn't exist in C:\ and should ask you whether you want to create it or not.
    I know how to do that for files, but not for folders!
    Thanks in advance

    hi guys,
    i`m new at this so im gonne prob. ask a noob`s question...
    i have the same issue as in the title.
    but when i run :
                                              int a,b,c,d,folderexist=-1;
                                             switch (event)
                                                       case EVENT_COMMIT:
                                                                                 GetCtrlVal (panelHandle, PANEL_NAME, name);
                                                                                 folderexist = GetFileAttrs (name, &a, &b, &c, &d);
                                                                                 if (folderexist==-1)
                                                                                           MakeDir (name);
                                                                                           sprintf...........
                                                                                 else.......
    if the folder do exists it works perfectly.
    if it doesnt - it breaks the run and gives me the message :
                          NON-FATAL RUN-TIME ERROR: "NewScap.c", line 317, col 27, thread id 0x00001B98: Library function error (return value == -1 [0xffffffff]).
    (and mark the getfileattrs line in blue)
    and when i check the "folderexits" value it shows 2!? not 1 not 0 not even -1, but 2...
    can somone please help ?
    thanks 
    Adi.

  • Server.MapPath(virtualPath) Returns root directory of controller, it is nor returns the physical path mentioned in the virtual directory in IIS

    I have created a virtual directory "myVirtualFile" virtual path is "\myVirtualFile" and I have given physical path as "D:\Home\myProject\Files"
    Below is my code
    var virtualpath="/myVirtualFile\UserManual";
    var resultPath=Server.MapPath(virtualpath);
    out put is resultPath contains "D:\Home\myProject\Web\client\myVirtualFile\UserManual" Expected out put is "D:\Home\myProject\Files".
    It returns the folder structure of my project. I didn't return the physical path which I mentioned in virtual directory.

    Hi,
    I am not expert on Asp.Net. But I will try my best.
    The following sample is what are
    Virtual paths and Physical paths
    ASP.NET the "~" tilde indicates the root of a virtual path.
    Virtual paths
    ~/App_Data/Sample.xml
    ~/
    ~/Map.txt
    Physical paths
    C:\Website\Files\Sample.xml
    C:\Website\Default.aspx
    C:\Website\Map.txt
    Server.MapPath doesn't find automatically where a file is. It allows to get the physical path
    corresponding to a virtual path (relative to the current request if you don't give an absolute path)
    If above still cannot resolve your issue, please repost in Asp.Net forum, The link as above posted.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error while creating folder: Path is invalid because folder does not exist

    Hi,
    I am having an issue while creating Folders in ID, when I create folder Structure like EDI -> VENDOR -> DELL I am getting the error as below:
    Path /EDI/VENDOR/DELL/ is invalid because folder VENDOR does not exist
    So first 2 levels of folder structure is fine and when I create third level (DELL) I get the above error. Any idea how to resolve this or is this the limitation?
    We have
    Service Pack:06
    Release:NW711_06_REL
    Thanks,
    Laxman

    Hi Laxman,
    Kindly try to refresh the SLD cache by going to Environment -> Clear SLD Data Cache. Make sure that the Cache Status are all in green.
    Hope this would help.
    Regards,
    Jenny

  • Add all files in the path while creating folio file in Folio builder

    Hello everyone.
    I am using InDesign CS 5 and creating folio for iPad 2. My Folio builder was working fine till last week, but suddenly i see a change the way it behaves. When I update the files in Folio builder, it adds all the files in the path (not just the links in the file) including source PSD files and other related files which I have never used in the InDesign, making the folio file increase in size. Can someone please help me how to overcome this situation?
    Thank a lot in advance.
    I look forward for your solution.

    Do you have an HTML file in there? If so, put it it (and its assets) in its own folder.
    Bob

  • How to detect the 'full path' of an open folder

    I often end up with open windows that display the contents of a folder but no path information. One example would be a folder opened from clicking on a 'hit' from a Spotlight search.
    I often don't know where those folders are in the folder hierarchy on my hard disk (and have no desire to create an alias for them).
    Is there a way to quickly determine the path?
    Thanks.

    +You could also add the "Path" item to the toolbar:+
    +1. Open a Finder window.+
    +2. Click View>Customize Toolbar...+
    +3. Drag the "Path" item into the toolbar. It will be added on all Finder windows. To find the path of a folder, just click the icon.+
    Thanks, I didn't know that one. It still requires using the mouse to view the path, but according to Tom X there doesn't seem to be an option in OS X for automatic path display in the window's title bar.

  • Time machine backup fails; error creating folder. Western Digital drive requires password which is perhaps/likely the issue. I can't eliminate the password/encryption.

    Time Machine backup fails on new WD external drive (My Passport Studio); error creating folder (after several hours of Time Machine apparently working).
    Background: I purchased a Western Digital drive from an Apple Store to use for Time Machine backup.  I followed the Western Digital instructions that came with the drive for Mac. I didn't get the Time Machine prompt which the instructions indicated I would receive--namely to select whether I want to encrypt my Time Macine backups. (I already have a Time Machine backup I use at another location, which is perhaps why I didn't receive a prompt.)
    I decided to install the Western Digital utilities and security software that comes on the disk--with a view to potentially encrypting the disk (since I still wanted to have an encrypted backup since I was mobile). I forgot that (from experience 2-years previous) that I shouldn't install Western Digital software because it just makes life really complicated.
    I tried several times to do a Time Machine backup with failures each time (error creating the backup folder). I tried to get help from WD but I don't think the technicians were following what my issue was. Potentially I was not helpful in explaining it. I deleted the WD applications from my system after the first contact with WD. However the problem persisted--I still had an encrypted hard drive. After three phone sessions with three different WD techs I still could not get a solution. (By the second call I was not at all interested in having an encrypted drive--I just wanted to format and restore the drive to an unencrypted state so that I could have SOME kind of Time Machine backup.)
    I still don't have a solution--either to get Time Machine working with the WD encryption/password on the drive, or to remove the encryption so I can backup. Right now my options are to return the drive to the Apple Store -- or get a return authorization from WD. Seems crazy since the drive is fine and I have the working password.

    Never install "helpful software" provided by WD and Seagate (or any HD mfg.)
    All such stuff is fluff and nonsense that interferes with normal HD operation.
    Always when you buy a new HD, format it for Mac and then use it to TM backup or clone a HD, or archive data.
    Less is more on HD new out of box.  A "blank brick", no fluff and cotton candy software

  • How can i get the path to config folder placed inside the jar file?

    Hi i have developed an RCP application using eclipse.
    In my application config directory is there.
    When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
    When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
    Will the config folder exists in local cache in my system?
    Help needed.
    -Deepak

    -- This works in CS6:
    tell application "Adobe InDesign CS6"
      set myDocument to active document
      set selectedRectangles to selection of myDocument
      set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
    --> "Macintosh HD:folder/folder/filename.tif"
    end tell

  • How to handle the 'folder button' in the path command throug Event loop ?

    Hi everybody.
    Again a stupid question but I can't find the answer.
    My VI has a dynamic event loop, to execute the right code depending on user action.
    Everything is working well but now I wish to do the following :
    I use a 'path command' with the path entry (like for text) and the folder button.
     the user click on the path entry     ->   something A happens.
     the user click on the folder button  ->   something B happens.
    As the folder button and the path entry are the same command, how to differenciate those two events in the event structure ?
    Maybe there is a value in the node, but I can't find it ...
    Thanks for helping !

    You can't do exactly what you are wanting to do. The problem is that you can't trigger an action based on clicking the browse button. To implement that you will need to hide the browse button that LV creates and put down a button of your own that you can then track and respond to independently.
    Mike...
    PS: what is it exactly that you are trying to accomplish?
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • How do I sync my music from my iphone to my mac when I have created a itunes library on my old computer?

    How do I sync my music from my iphone to my mac when I have created a itunes library on my old Hewitt packard computer? Thought by connecting my phone to computer it would automatically duplicate. Only seems to work with a small amount of music which

  • Error while configuring ths schedule

    Hi all, I was created the reports based on x server, i am able to see all the reports. At the time of configure the schedule option, i was provided the all information(database connection and all) after that i am selecting the install schema it is gi

  • Trial Balance Tables

    Hi All Actually my requirement is, When I run accounts receivale report profit center wise then system is showing some balances in null/dummy profit center. Now I update profit center of these documents from null to some other in table FAGLFLEXA and

  • Recovery Disks sent by Toshiba do not work.

    So about two months ago my hard drive started failing, and my Winsdows 7 partition stopped working. So I ordered Toshiba Recovery Discs using my serial and part number given on the bottom of my computer. When I follow the instructions that came with

  • JSP compiled into servlet

    Whenver u compile a JSP page it is internally converted into servlet.Where will this servlet be stored and by what name?