• Post Reply Bookmark Topic Watch Topic
  • New Topic

directories and sub directories.

 
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: 9361
11
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..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!