• Post Reply Bookmark Topic Watch Topic
  • New Topic

How will i get all the shared folder names in windows7 from entire network  RSS feed

Abhish Sharma
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends.
There is a simple problem which is working in wndows xp but not in windows 7. Can any one suggest me something fruitful.

Ok My problem is.....
I need o choose a file from network using file chooser. So i wrote the code as follows
JFileChooser fileChooser = new JFileChooser();
FileNameExtensionFilter filter = new FileNameExtensionFilter ("Excel files", new String[] {
"xls", "xlsx" });
fileChooser.setCurrentDirectory(new File("C:\\Documents and Settings\\$USER$\\NetHood"));
int status = fileChooser.showOpenDialog(this);

The line C:\\Documents and Settings\\$USER$\\NetHood is working fine for XP but not in windows 7 for obvious reason. That is in 7 we have somewhat different directory structure. So can any one suggest me what should i change in my code so that i get the same result as what i was getting in winXP. It is quite important to mention that path users\$USER$\AppData\Roaming\Microsoft\windows\Network Software is not working here
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!