Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

directories and sub directories.  RSS feed

 
Anas El-Abboud
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends , i faced aproblem :

i want to scan all directories of "homeDir" to copy a trial file into them but i can't copy the file except the first level of the dir..
that means if i searched a multi level tree of directory i can't access all its levels !
what can i do ?



thanks
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to include the path in the file name. It can be relative to your working directory or absolute. Take a look at the Java API Documentation for java.io.File.
 
Anas El-Abboud
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Joe Ess , i tried to put the getProperty("user.dir");
and it worked ! , thanks friend..
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!