473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

creating directories issues

momotaro
357 100+
Hi,
I have a function that handle directories creation here it is:
Expand|Select|Wrap|Line Numbers
  1. public File createDirectory(String name)
  2.     {
  3.         File directory = new File(name);
  4.  
  5.         if(!FileOrDirectoryExists(name)) 
  6.             directory.mkdir();
  7.         return directory;
  8.     }
but when I pass a string to it in this format: pkg\\links
it is supposed to create a folder named pkg AND a sub-folder
named links no?

the behavior is that it creates pkg but not links until I run the app a second time.
Jul 29 '11 #1
1 1357
momotaro
357 100+
never mind just replace mkdir by mkdirs :) thx anyway
Jul 29 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dave | last post by:
I am using vs.net 2003 on windows xp. After clicking on a project within my solution and selecting create new folder vs.net responds back with , the "directory already exists". If i look at the...
5
by: Patrik | last post by:
I know how to read/write files using iostram, but I can't figure out how to create a directory. Say I wan't to create a directory called "/home/work/outfiles", how do I do that? I'm running red hat...
6
by: Eran Kampf | last post by:
I am trying to dynamically create directories in my ASP.NET application (I am using Server.MapPath("/")+"test" as the folder) and I am getting a DirectoryNotFoundException saying "Could not find a...
1
by: Senthil | last post by:
Con is the file name for a reserved device name(i think it is for console). So you cannot create a file with name 'con'. choose some other name senthil >-----Original Message----- >Hi...
3
by: Stelrad Doulton | last post by:
Hi, I am having a strange problem on IIS 6.0. I am trying to create directories under a virtual directory on the fly to which I will upload files and retrieve these files later. I am having 2...
3
by: tkal2k | last post by:
i want to create a directory in a certain subfolder, but here's the catch each entry in my database is assigned an autonumber i want to be able to create a new directory when i press a button...
4
by: Stimp | last post by:
When a user registers with my site, I create a separate folder for them (for uploading photos, etc). The code for this has been working fine for 1 year, but over the past 2 weeks it has been...
4
by: samreen | last post by:
i want to create and access directories using C functions.............could u please help me out regarding this....
0
by: srinivasan srinivas | last post by:
Can someone tell me is there any module available to create directories?? I tried os, tempfile. I was facing some issues with os.mkdir(). Themode setting was not proper with this method. I...
0
by: david wright | last post by:
--- On Fri, 9/5/08, srinivasan srinivas <sri_annauni@yahoo.co.inwrote: this appears to be working, what where you expecting? "An upper case "S" means there is no executable permission, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.