Searching the files in folders and subfolders

Microsoft Windows xp professional w/serv...
June 23, 2010 at 23:34:39
Specs: Windows XP
Hi All,
I am trying to write a java code for searching and listing all the files in particular folder and its subfolders.
I would like to store the list of files in a csv file.

Any idea?


See More: Searching the files in folders and subfolders

Report •


#1
June 24, 2010 at 17:11:17
this has been extremely helpful to me in learning script (both vb and java):
script56.chm
For what you want, type "filesystemobject" in the Index "type Keyword to find" box.
You will want to do something like:
function ShowFolderList(folderspec)
{
var fso, f, fc, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(folderspec);
fc = new Enumerator(f.SubFolders);
s = "";
for (;!fc.atEnd(); fc.moveNext())
{
s += fc.item();
s += "<br>";
}
return(s);
}

and this:
function ShowFolderFileList(folderspec)
{
var fso, f, fc, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(folderspec);
fc = new Enumerator(f.files);
s = "";
for (; !fc.atEnd(); fc.moveNext())
{
s += fc.item();
s += "<br>";
}
return(s);
}

(these are cut/pasted straight from the help examples)


Report •

#2
October 19, 2010 at 00:26:26
hi,
I'm Trying to search a the files from folder/subfolders depending upon the creation date of the file.
i.e. if file is created on 20101910 then it be moved to 20101910 folder.

Plz do help me As sson as possible


Report •
Related Solutions


Ask Question