Creating a folder in Mac os

HI all,
How to create a folder in Mac os using java ? In windows i use
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("cmd.exe /c mkdir directoryname");
Please help me....
Thanks in advance
Ravi

Hi Ravi,
I saw your post and question,. The way you said u create a folder in windows using the Runtime class is somehow cumbersome and reduces platform independence. Even some versions of Windows may not recognize cmd.exe.
Why not just use the mkdir() method of the File class? This create a new directory and I believe this should work in Mac too though I did not really test it. But I believe it should work. The code will look like this:          File f = new File("dirname/");
         f.mkdir(); The dirname may be absolute, and may or may not end with a /.
I hope this soles your problem.

Similar Messages

  • How to create shared folder between mac and windows

    how to create shared folder between mac and windows

    Us ean external drive formatted FAT32 or ExFat. Both OSx and Windows can read/write to the drive and both can use the same data files as long as you have a program that can open and save these files. For example, Word running both on OSx and on Windows will be able to work with the same document on the external drive.

  • How to create a folder in mac os x (10.5.x) with director 11.5

    hi:
    i'm using FileXtra4 in windows and it's work perfect, when i try it in mac os x, director tell me 'Script Xtra not found' this xtra file is in de Xtra folder and i don't now what's happened.
    i need create a folder for save a historial file of users.
    how  i do to work this xtra or tell me if exist other Xtra to create a file.
    (Sorry for my bad english)

    I don't think that FileXtra was ever updated to Director 11, so the mac version will not work.  And the PC version may well have problems.  You'll need to use another xtra that has been updated, like for example, BuddyAPI.

  • Creating a folder on an SMB share using a Mac

    Hi everyone,
    This is more of a question than a problem I'm trying to solve, really. Though the answer might help me better explain the issue to our security team.
    Our environment has multiple Windows file servers, both 2003 and 2008. If one of these SMB shares is accessed from a Mac and the user creates a folder, will the ACLs on the share that are set to cascade actually cascade to this newly created folder? We've had issues in the past where ACLs that are supposedly set to cascade on a shared folder are not present on sub-folders created from Macs.
    Next question: if the share resides on a netapp device, do the same rules apply? The Macs are still connecting to these shared folders using the SMB protocol.
    All Macs are bound to our 2008 AD domain and use network accounts with local homefolders. The issue seems to happen when one or both of the following things happen:
    1. A Mac user copies/creates a folder on a Netapp share and for some reason it doesn’t inherit rights correctly
    2. We move the folder from one share on an actual Windows server to the Netapp and it doesn’t take permissions correctly.
    Please let me know if you need any other information.

    Let's put it this way: I'm asking on a Mac site because the people on non-windows support sites are WAAAAY more interested in talking about problems and solutions involving things other than Windows.
    I'm fairly certain that the windows servers ARE respecting their own inheritance rules, barring any major bugs and the like which someone may know about...
    The isue isn't with Macs moving shares to a netapp, it's with a share being moved to a NetApp that has folders created by a Mac. Talking with our security team further, it seems the problem may be limited to shares resident on a NetApp or moved from a Windows server to a NetApp.
    I was primarily asking to see if anyone knew of any issues with these particular situations or had experienced something similar and had dug into it any deeper with F5 (NetApp vendor).

  • I have created a folder that I can now Save to and view in Photoshop (CS4) but cannot find in spotlight or any other way on my mac. PLEASE HELP!!

    I use Photoshop CS4, I do not think this problem is related to PS... I am not exactly sure what happened. I created a folder on desktop, think I changed name of it. Now it is not on desktop. I know the exact name of the folder and have tried doing a spotlight search and cannot locate it AS WELL as searching for a file by name EXACT as name is. However if I go into Photoshop I can open or "save as" and open the folder and save as a "recent location" and the folder and its contents are found no problem... however cannot see the pathway to know where the folder is located on my mac.. PLEASE HELP!!! Been using photoshop and my mac for MANY years and NEVER had a problem like this... I have a photo client awaiting their pictures to be burned on a cd and mailed to them!!
    THANK YOU!!
    Laurie

    Try this. Open one of your files. The window that contains your picture is named at the top. Command click on the name and you'll see the entire path starting with its name and then moving to the folder, the folder it is contained in, etc all the way to down to the hard drive volume name. This should tell you where to find the folder.

  • Creating server based folder on mac/me IMAP- Problem!!!

    I'm having a problem creating an IMAP server based folder to sync with my iphone.
    I can create one for my personal domain email account, which, when sync via itunes appears in my mail app on the iphone.
    But when I try to create one for my .mac/.me account, it does not appear in my Mail app on my computer, let alone on my iphone.
    I click the '+' at the bottom of the left hand pane, click 'new mailbox' and then using location 'mac', with the nice picture of the cloud, enter the name I'd like it to have.
    Can anyone tell me what I'm doing wrong, or do I have a bug?
    Thanks
    Al

    http://www.biscade.com/2010/09/bootable-macpro-raid/

  • HT2798 I have a Mac OS 10.6.8 server in my classroom that I have networked to each student's account.  How do I create a folder that allows them to place their finished assignments in it, but does not allow them to go in and remove anything from that fold

    I have a Mac OS 10.6.8 server in my classroom that I have networked to student accounts on the iMacs in the room.  How do I create a folder that allows studnts to place their finished assignments in it, but does not allow them to go in and remove anything from that folder?

    You want a "Drop Box" style folder. You should be able to achieve this by creating a folder and giving it permissions similar to the "Drop Box" folder in your users Public Folder (i.e. write only permissions.)

  • How do i create a folder toorganize my documents in Word for Mac?

    How do I create a folder to organize my documents in Word for MAC. I have the 2011 version.

    Just a tip...
    I create folders in my Documents folder: "Word Docs", "Excel Docs" and "PowerPoint Docs".
    No need for an "Outlook Docs" because that's all stored in the "Microsoft User Data" folder in your Documents folder.
    Along with the video that Andy provided, you should be able to manage your Office documents well.
    Good luck,
    Clinton

  • Can we create a folder in one desktop without sharing that folder in other desktop in mac?

    I have created a few desktop in my mac. Can i create a folder in one desktop, which does not share in other desktop?Can I have different folders in different desktop? how to do that?

    No. Desktop spaces affect only applications and their windows. If an icon appears on the desktop it appears on every desktop.

  • I want to make a note and put in a folder like we just place a notepad by right clicking in windows,how should I create a note in a folder in mac pro ...?

    I want to make a note and put in a folder like we just place a notepad by right clicking in windows,how should I create a note in a folder in mac pro ...?

    There's no "New File" shortcut in Finder on Macs, so you have to launch the application you want (eg TextEdit), create your document, and save it there. There are workarounds using Terminal (the touch command), AppleScript/Automator, and using third-party launch programs like Quicksilver, but natively, it can't be done.
    Matt

  • Can't create a folder on a shared Mac

    I'm using my mid-2010 iMac with OS 10.9.1, logged in with my username. I'm connected via sharing to my wife's 2006 MacBook Pro running 10.6.8, logged in with her username.
    I can connect to the MBP fine. I can see folders on it, and open them. What I can't do is create a folder on the MBP from the iMac. The first thing that comes up when I try is my permission screen with my user name, with a message that I'm changing the Finder.  I put in my password, and the next popup is a message saying that I don't have privileges to create the folder. I have Read & Write permissions for me set on the MacBook Pro all the way from the top level internal drivel down to the level I'm trying to create a folder in. I'm trying to create a folder within the Music folder on the MBP.
    Anyone have any ideas what the problem might be?

    I figured it out. It's odd though. It was allowing me to see and operate the folders on the MBP using an older username from one of my prior OSs. My new Mavericks username is different than whet the permissions on the MBP were set to. Once I set up permissions on the MBP using the username that appears on my iMac Mavericks' in the User folder, it allowed me to create the folder. Strange though that it would let me connect and share without the new username.
    NOT SOLVED. . It still doesnt work. I mistakenly created the folder in my own User Music folder on the iMac by mistake

  • The installer can't create the folder '/var/folders/jp  Mac Pro, Mac OS X (10.7.5)

    when i installing program softwares it say's the installer can't create the folder '/var/folders/jp………..in my macbook 10.7.5. please give solution my problem.

    I forgot to add that some can log in and others cannot, but no specific one MacBook.

  • Is there a way I can create a folder within another folder on mac?

    I am trying to create a folder within folder. Ex: Vacation Photos > Vacation Year > Vacation Spots ( not of photos ) but like document files. Better example  I am taking an IT class and we have different units 1-10 I would like a folder for each unit under my IT document EX: IT 133 > Unit 1 > Unit 2 etc. Thanks in advance.

    This may also help you organize your files / folders:
    OS X: Tags help you organize your files.

  • I am trying to create a folder and save it onto my desktop but apparently I do not have permission to do so. How can I change this?

    I am trying to figure out how to create a folder on my desktop. For some reason, my desktop folder is no longer available and whenever I try to set one up, an alert states that I do not have permission to create one. I don't know what to do.

    I think you need to repair user directory permissions.  Follow these instructions:
    http://osxdaily.com/2011/11/15/repair-user-permissions-in-mac-os-x-lion/

  • Creating a folder, within a folder

    I've dumped my PC for a Mac, so still a noob!
    How can I create a folder, from within a folder using Finder? Every time I do, it creates the folder at the root, and I then have to move the folder to the desired location? I'm obviously missing something!
    Thanks

    Since you're a noob, see these:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    MacFixIt Tutorials,
    MacTips, and
    Switching to the Mac: The Missing Manual, Leopard Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist.
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

Maybe you are looking for