File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes neep help - files inside folder structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "neep help - files inside folder structure" Watch "neep help - files inside folder structure" New topic
Author

neep help - files inside folder structure

sonali manchanda
Greenhorn

Joined: Sep 16, 2010
Posts: 1
Hi All,

I have an issue where I need to search through a folder which has many subfolders and the subfolders also have folders.... The folders have files inside them.I need to create a folder of a particular name inside all the folders which have atleast one file or more and move all the files from that folder level inside this newly created folder.

This behaviour should be uniform throughout the folder hierarchy i.e the new folder should be created at all levels where there is atleast one file present(there could be more than 1 file) and all those files at that level should be moved inside the newly created folder at the same level.


Please can someone help or post some sample code if possible.

Thanks

Sonali
Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 230
    
    2

Java File I/O Tutorial
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

The following code snippet might give you some clue


Swastik
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
And welcome to the Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: neep help - files inside folder structure
 
Similar Threads
creating jar file programatically
Sending Folder over socket
creating a new project in eclipse from an existing web project
Show the selected file and folder in tree structure with checkbox and the checkbox should be only..
Packaging, naming and directory structure.