Questions tagged [mkdirs]
87 questions
0
votes
0 answers
Java mkdirs with / (slash) in foldername
I have a problem with java and mkdirs.
I would like to create a folder with / in its name like:
C:\Sun/Moon\
String pfad = projektnummer;
if (!kunde.isEmpty()) {
pfad = pfad + " " + kunde;
}
if (!projektname.isEmpty()) {
pfad = pfad + " - "…

Garog
- 315
- 1
- 5
- 15
0
votes
2 answers
Java, how to create new directory in remote host.
I'm working on Android app.
how can i create a new directory in a remote host in java?
I tried this but it doesn't work:
String newFolder = "http://www.mysite.it/public/newfolder";
File outFile = new File(newFolder);
if(!outFile.exists()){
…

L.Grillo
- 960
- 3
- 12
- 26
0
votes
2 answers
mkdirs() works when executing from JAVA but not from MATLAB, why?
I am out of luck with my JAVA Application executed from MATLAB. In short I have following code:
try {
dir = new File("Patients/Patient" + patientNumber + "/Meals");
dir.mkdirs();
.... more code goes here
} catch (Exception…

SteewDK
- 363
- 1
- 4
- 14
0
votes
2 answers
using itertools to create sub directories
Extremely new to Python, just got out of a very basic training course and delving into my first application I'm using python3 and i have been trying to get itertools and os.mkdirs() to create a standard directory structure under a user defined…

jon141
- 45
- 2
- 11
0
votes
1 answer
java File mkdirs and createNewFile won't work
I'm trying to copy and existing directory structure (no need for the file contents themselves, 0 length dummy files will do). However mkdirs() won't create the necessary directories, causing file.createNewFile() to throw an IOException. The code…

András Hummer
- 960
- 1
- 17
- 35
0
votes
1 answer
Trouble backing up sqlite db to file on certain Android phones. mkdirs() not working sometimes
I have written code to back up my sqlite db to a file on my Android phone (Sony Ericsson X-8 w/ version 2.1.1 of Android).
I have put the code below for reference, but before reading it, I stress that it works fine on the X-8. [Any suggestions for…

Dave
- 8,095
- 14
- 56
- 99
0
votes
3 answers
Android: Directory made dynamically doesn't appear to user
I tried to make a directory dynamically using mkdirs() and it created sucessfully the directory and copied the files to the created directory. It's possible to see the new directory in the tablet (xoom) but when I connect to my PC to copy some files…

JannGabriel
- 302
- 5
- 14
-1
votes
1 answer
Difference between different manufacturers
Currently I am working with files in android and in order to create directory I used mkdir() command. The issue is, it worked on devices like Samsung,LG,Pixel and few others while it didn't work in One Plus of same API version. Replacing mkdir()…
-1
votes
1 answer
File.mkdirs() does not create the folders - Android Marshmallow (API 23)
Android Manifest Permissions
Java file (First try)
String path =…

Ravin
- 13
- 1
- 5
-1
votes
1 answer
java mkdirs did not work well (on Android platform)
I have a problem with File.mkdirs().
[my test code]
public boolean makeFolder(Context context, String path){
if(path == null || context == null)
return false;
File itemPath = new File(path);
if(itemPath.isDirectory())
…

PodotreeDev
- 1
- 1
-3
votes
1 answer
Why does my File.mkdirs() always return false?
I am following the code snippet given here in this guide. The following lines (particurly the last if block in the following lines) are presenting a problem:
File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(
…

Solace
- 8,612
- 22
- 95
- 183
-3
votes
1 answer
Is ":" allowed in a folder name in Android?
Can we put ":" in the name of a folder?
For example if I want that the name of my file(case) is the hour of today (on this form 14:38).
String outString = new SimpleDateFormat("dd-MM-yyyy hh-mm-ss").format(new Date());
File dossierphoto = new…

John Snow
- 21
- 1
- 3