/    Sign up×
Community /Pin to ProfileBookmark

Harddrive Directory Listing

This is probably a strange request, but I’m trying to find a script that will display the contents of multiple folders from the user’s harddrive to the user only.

For example, a certain program may have files spread through different directories. I want a field that will display those files from all directories (i.e. all directories that are specified – no need for user input on that). If possible, alphabetization would be sweet. I saw this script that claimed to display files:

<script type=”text/javascript”>
var path = ‘C:/…..’; // Starting directory
function thefiles() {
// Puts the file names of this directory into an array
var file_array = get_files(path).split(‘|’).sort();
}
</script>

<script type=”text/VBScript”>
Function get_files(path)
Dim List
Set fso = CreateObject(“Scripting.FileSystemObject”)
Set Folder = fso.GetFolder(path)
Set Files = Folder.Files
List = “”
If Files.Count > 0 Then
For Each File In Files
List = List & File.Name & “|”
Next
End If
get_files = List
End Function
</script>

However, this does not work for me. Could someone tell me what I am doing wrong, or where I should be looking for this kind of thing?

Thanks!

WHS

to post a comment
JavaScript

64 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliFeb 13.2005 — FileSystemObject used to work for IE, however its a pain in the nexk and for sure it should not work with IE at all because it gives any external user to hack into a remote clients machine using just a browser(IE only).Sorry that my answer is not what you expected but its a right one.
Copy linkTweet thisAlerts:
@whsauthorFeb 13.2005 — Thanks for your response. Is there any other way to simply let the user view their own files through an interface?
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — I recently posted this code. You probably never searched for threads relevant to your question. Anyway, I see no reason to reject out of hand an entire scripting language merely because it has the capability of doing something of which one doesn't approve.


<HTML>

<Head>

<Script Language=JavaScript>

var fileList = "";

function insertList(){

document.forms.Form1.listField.value = fileList;
}


</Script>

<Script Language=VBScript>

Function CreateFileList(folderSpec)
Set fso = CreateObject("Scripting.FileSystemObject")
Set currFolder = fso.GetFolder(folderSpec)
Set nFile = currFolder.Files
For Each isFile in nFile
nameStr = nameStr & isFile.name & vbCRLF
Next
fileList = nameStr
Set fso = Nothing
insertList()
End Function


Function checkExist(testFolder)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(testFolder) Then
CreateFileList(testFolder)
Exit Function
End If
MsgBox "The folder " & testFolder & " does not exist..."
Set fso = Nothing
End Function


</Script>

</Head>

<Body>

<Form name='Form1'>

<textarea id='listField' cols=35 rows=6></textarea>

</Form>

<br><br>

<input type=button value="List Files" onclick="checkExist('C:WindowsDesktopProject')">

</Body>

</HTML>
Copy linkTweet thisAlerts:
@whsauthorFeb 13.2005 — Warren,

Thanks for your response. I found the script above through the search, but I don't think I did a very good job of searching.

When I try to run your script, I get this error:

"ActiveX component can't create object: Scripting.FileSystemObject"

Is there something I'm doing wrong?

Thanks!

WHS
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — Well, maybe you are one of those who use cult browsers like Netscape or whatever. VB works only in IE. If you are using IE, and you copied and pasted my code AS IS, then your security settings are too "high."
Copy linkTweet thisAlerts:
@PittimannFeb 13.2005 — Hi!

whs uses IE. Must be the settings.

Cheers - Pit
Copy linkTweet thisAlerts:
@whsauthorFeb 13.2005 — I'm guessing you have a script that tells you which browser I'm using. Actually, I'm using Firefox to access this forum, but I just managed to open the script in IE and it worked.

By any chance, do you know how to make the script work in firefox as well? If not, that's no big deal - I really appreciate your help.

Also, is it possible to expand on your script to make the files clickable and draggable to, say, another form that would move the files on their computer? That's probably a stretch...

Thanks!

WHS
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — WHS:

Sorry, but again, VB works in IE ONLY.

And sorry about the click and drag as well.


But, JS has <input type=file> which will open a dialog that allows a user to select a file, and then that filename can be placed in a form field. When the form is submitted, the file will upload.

Look into that, if you believe it will serve your purpose.
Copy linkTweet thisAlerts:
@PittimannFeb 13.2005 — Hi![i]Originally posted by whs [/i]

[B]"ActiveX component can't create object: Scripting.FileSystemObject"[/B][/QUOTE]
Such a message is produced by ActiveX itself, so no browser other than IE can throw it onto your screen. So it was logical, that you tried Warren's script in IE.

As far as FF is concerned: ActiveX and VBScript do not have a chance there.

Cheers - Pit (and: don't worry - I do not have access to anything belonging to you than what you post here)
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — P.S.

And just for evaluation purposes, here's an example.

<HTML>

<Head>

<Script Language=JavaScript>

function getStats(fName){

nullIMG.src = fName;
fullName = fName;
shortName = fullName.match(/[^/\]+$/);
splitName = fullName.split(".");
fileType = splitName[1];
fileType = fileType.toLowerCase();
if (fileType == 'gif' || fileType == 'jpg' || fileType == 'jpeg')
{
checkIt = fileSize(fullName);
if (parseInt(checkIt) > 30000){alert('Max File Size is 30Kb');Form1.reset()}
else {
Form1.dispSize.value = checkIt;
Form1.dispName.value = shortName;
Form1.dispW.value = nullIMG.width;
Form1.dispH.value = nullIMG.height;
}
}
else {
alert("You must select an image file!");
Form1.reset();
}
}

divStr = "<Div Style='Position:Absolute;Top:-2000'><IMG Src=Null ID=nullIMG></Div>"
document.write(divStr)


</Script>

<Script Language=VBScript>

Function fileSize(fileSpec)
Dim isSize
Set fso = CreateObject("Scripting.FileSystemObject")
Set contentFile = fso.GetFile(fileSpec)
isSize = contentFile.Size
fileSize = isSize
Set contentFile = Nothing
Set fso = Nothing
End Function


</Script>

</Head>

<Body>

<Form name='Form1'>

Choose an image: <input type="file" name="isIMG" onChange="getStats(this.value)"><br>

File Name: <input name='dispName' size=20><br>

File Size: <input name='dispSize' size=10><br>

Width: <input name='dispW' size=5><br>

Height: <input name='dispH' size=5><br>

<input type=Reset><br>

<input type=submit value="Submit Form">

</Form>

</body>

</html>
Copy linkTweet thisAlerts:
@whsauthorFeb 13.2005 — Wow, thanks a lot. You guys are incredibly helpful. Last question: can I use your (warren's) first script to show the contents of multiple folders?

I mean to say can I adjust this line:

<input type=button value="List Files" onclick="checkExist('C:Folderetc')">

In any way to make it read the contents of multiple folders instead of just one, and put all of the results in there?

Thanks!

WHS
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — Oh, I'm sorry, I posted an earlier version of the code. This is the better version. And just use two lines, as shown, for two folders.


<HTML>

<Head>

<Script Language=JavaScript>

function insertList(){

fileList1 = CreateFileList('C:\Windows\Desktop\Project')
fileList2 = CreateFileList('C:\Windows\Desktop\Project')
document.forms.Form1.listField.value = fileList1+fileList2;
}

window.onload=insertList;


</Script>

<Script Language=VBScript>

Function CreateFileList(folderSpec)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(folderSpec) Then
Set currFolder = fso.GetFolder(folderSpec)
Set nFile = currFolder.Files
For Each isFile in nFile
nameStr = nameStr & isFile.name & vbCRLF
Next
CreateFileList = nameStr
Set fso = Nothing
Exit Function
End If
CreateFileList = "The folder " & folderSpec & " does not exist..."
Set fso = Nothing
End Function


</Script>

</Head>

<Body>

<Form name='Form1'>

<textarea id='listField' cols=40 rows=6></textarea>

</Form>

</Body>

</HTML>
Copy linkTweet thisAlerts:
@rodentjeFeb 13.2005 — i'm very interested in the latter too, i'm looking forward to an answer on this one...

ps, warren, why do you always use VBScript for the fso object, it works in JavaScript as well... I wrote this lately:
[CODE]function WriteToFile(temp,output) {
var filename = output;
var drvpath = filename.charAt(0)+':'+'\';
var fso = new ActiveXObject('Scripting.FileSystemObject');
var d = fso.GetDrive(drvpath);
if(fso.DriveExists(d.DriveLetter)==true){
if(d.IsReady){
if(fso.FolderExists(getFolder(output))){
if(fso.FileExists(output)){
input_box=confirm("Are you sure you want to replace the selected file?");
if (input_box==true){
var file = fso.CreateTextFile(filename, true);
file.WriteLine(temp);
file.Close();
confirm('HTML Script Succesfully Encoded! - © Diricx Bart');
}
}
else{
var file = fso.CreateTextFile(filename, true);
file.WriteLine(temp);
file.Close();
confirm('HTML Script Succesfully Encoded! - © Diricx Bart');
}
}
else{
input_box=confirm("The folder doesn't exist, do you want to create it?");
if (input_box==true){
var path = getFolder(filename);
var index = 4;
var index2 = 4;
var temp2=4;
do{
index = path.indexOf('\',temp2);
index2 = filename.indexOf('.');
var folder = filename.substring(0,index+1);
if(!fso.FolderExists(folder) && index!=-1){
var file2 = fso.CreateFolder(folder);
}
temp2=index+2;
}while(index!=-1)
var file = fso.CreateTextFile(filename, true);
file.WriteLine(temp);
file.Close();
confirm('HTML Script Succesfully Encoded! - © Diricx Bart');
}
}
}
else alert("The selected drive isn't ready !!!");
}
else alert("The selected drive doesn't exist !!!");
}

function getFolder(s){
var index = s.indexOf('.');
var i = index;
var spil=true;
do{
i--;
if(s.charAt(i)=='\'){
index=i;
spil=false;
}
}while(spil==true);
return s.substring(0,index+1);
}

function ReadIt(s) {
var filename = s;
var fso, a, ForReading;
output = "";
ForReading = 1;
fso = new ActiveXObject('Scripting.FileSystemObject');
file = fso.OpenTextFile(filename, ForReading, false);
try{
while(true){
output+=file.readline()+"n";
}
} catch(Exception){}
file.Close();
return output;

}[/CODE]


or has it any advantages over js?

regards, RoDeNtJe
Copy linkTweet thisAlerts:
@whsauthorFeb 13.2005 — Awesome! This works really well. I really appreciate your help!

WHS
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — You're welcome. I appreciate your courtesy. Good luck with your project. I hope that you were not too quick on the draw as it were, and copied the immediately preceding code before I had a chance to catch the error and edit it. This line:

document.forms.Form1.listField.value = fileList1+fileList2;


Should be exactly as shown. Before I corrected the error, it was like this:

document.forms.Form1.listField1.value = fileList1+fileList2;


listField, should be that, and not listField1
Copy linkTweet thisAlerts:
@whsauthorFeb 13.2005 — Yep, I have it as that, and it works perfectly.

Thanks!

WHS
Copy linkTweet thisAlerts:
@Warren86Feb 13.2005 — You're welcome. Take care.
Copy linkTweet thisAlerts:
@whsauthorFeb 14.2005 — [i]Originally posted by rodentje [/i]

[B]i'm very interested in the latter too, i'm looking forward to an answer on this one...



ps, warren, why do you always use VBScript for the fso object, it works in JavaScript as well... I wrote this lately:

[CODE]function WriteToFile(temp,output) {
var filename = output;
var drvpath = filename.charAt(0)+':'+'\';
var fso = new ActiveXObject('Scripting.FileSystemObject');
var d = fso.GetDrive(drvpath);
if(fso.DriveExists(d.DriveLetter)==true){
if(d.IsReady){
if(fso.FolderExists(getFolder(output))){
if(fso.FileExists(output)){
input_box=confirm("Are you sure you want to replace the selected file?");
if (input_box==true){
var file = fso.CreateTextFile(filename, true);
file.WriteLine(temp);
file.Close();
confirm('HTML Script Succesfully Encoded! - © Diricx Bart');
}
}
else{
var file = fso.CreateTextFile(filename, true);
file.WriteLine(temp);
file.Close();
confirm('HTML Script Succesfully Encoded! - © Diricx Bart');
}
}
else{
input_box=confirm("The folder doesn't exist, do you want to create it?");
if (input_box==true){
var path = getFolder(filename);
var index = 4;
var index2 = 4;
var temp2=4;
do{
index = path.indexOf('\',temp2);
index2 = filename.indexOf('.');
var folder = filename.substring(0,index+1);
if(!fso.FolderExists(folder) && index!=-1){
var file2 = fso.CreateFolder(folder);
}
temp2=index+2;
}while(index!=-1)
var file = fso.CreateTextFile(filename, true);
file.WriteLine(temp);
file.Close();
confirm('HTML Script Succesfully Encoded! - © Diricx Bart');
}
}
}
else alert("The selected drive isn't ready !!!");
}
else alert("The selected drive doesn't exist !!!");
}

function getFolder(s){
var index = s.indexOf('.');
var i = index;
var spil=true;
do{
i--;
if(s.charAt(i)=='\'){
index=i;
spil=false;
}
}while(spil==true);
return s.substring(0,index+1);
}

function ReadIt(s) {
var filename = s;
var fso, a, ForReading;
output = "";
ForReading = 1;
fso = new ActiveXObject('Scripting.FileSystemObject');
file = fso.OpenTextFile(filename, ForReading, false);
try{
while(true){
output+=file.readline()+"n";
}
} catch(Exception){}
file.Close();
return output;

}[/CODE]


or has it any advantages over js?

regards, RoDeNtJe [/B][/QUOTE]


Wow, that's pretty cool. Can the "save" part of this script be used with the previous script? What I mean is, can the list of files be clickable (in a list format), with a "Save to Desktop" button, for example?

Thanks!

WHS

/EDIT: To (maybe) further articulate this, could the files be put into the "select" form command, with the value being the location of the file? Maybe I'm way off, but something like this:

<select name=fieldname size=5 style="width:120;">
<option value=C:...>file1</option>
<option value=C:...>file2</option>
<option value=C:...>file3</option>
</select>
Copy linkTweet thisAlerts:
@rodentjeFeb 14.2005 — yes, indeed, this can be combined...
[CODE]<HTML>
<Head>
<Script Language=JavaScript>
window.onunload=function()
{
alert("Thanks for using this script !!!");
};

var fileList = "";
function displayList(){
document.forms['form1'].output.value = fileList;
}

function WriteToFile(output) {
var filename = output;
var text = fileList;
var drvpath = filename.charAt(0)+':'+'\';
var fso = new ActiveXObject('Scripting.FileSystemObject');
var d = fso.GetDrive(drvpath);
if(fso.DriveExists(d.DriveLetter)==true){
if(d.IsReady){
if(fso.FolderExists(getFolder(output))){
if(fso.FileExists(output)){
input_box=confirm("Are you sure you want to replace the selected file?");
if (input_box==true){
var file = fso.CreateTextFile(filename, true);
file.WriteLine(text);
file.Close();
confirm('List Succesfully Created !!!');
}
}
else{
var file = fso.CreateTextFile(filename, true);
file.WriteLine(text);
file.Close();
confirm('List Succesfully Created !!!');
}
}
else{
input_box=confirm("The folder doesn't exist, do you want to create it?");
if (input_box==true){
var path = getFolder(filename);
var index = 4;
var index2 = 4;
var temp2=4;
do{
index = path.indexOf('\',temp2);
index2 = filename.indexOf('.');
var folder = filename.substring(0,index+1);
if(!fso.FolderExists(folder) && index!=-1){
var file2 = fso.CreateFolder(folder);
}
temp2=index+2;
}while(index!=-1)
var file = fso.CreateTextFile(filename, true);
file.WriteLine(text);
file.Close();
confirm('List Succesfully Created !!!');
}
}
}
else alert("The selected drive isn't ready !!!");
}
else alert("The selected drive doesn't exist !!!");
}

function getFolder(s){
var index = s.indexOf('.');
var i = index;
var spil=true;
do{
i--;
if(s.charAt(i)=='\'){
index=i;
spil=false;
}
}while(spil==true);
return s.substring(0,index+1);
}

</Script>

<Script Language=VBScript>

Function CreateFileList(folderSpec)
Set fso = CreateObject("Scripting.FileSystemObject")
Set currFolder = fso.GetFolder(folderSpec)
Set nFile = currFolder.Files
For Each isFile in nFile
nameStr = nameStr & isFile.name & vbCRLF
Next
fileList = nameStr
Set fso = Nothing
displayList()
End Function

Function checkExist(s)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(s) Then
CreateFileList(s)
Exit Function
End If
MsgBox "The folder "+s+" does not exist..."
Set fso = Nothing
End Function

</Script>

</Head>
<Body>
<Div id='listDisp'></Div>
<br><br>
<form name="form1">
<textarea id="folder" style="width:75%" size="1" tabindex="1"></textarea>
<input type=button value="List Files" tabindex="2" onclick="checkExist(document.forms['form1'].folder.value)">

<textarea id="output" style="width:75%; height:350" tabindex="3"></textarea>

<br><br>

<textarea id="outputFile" style="width:75%" size="30" tabindex="4"></textarea>
<input type="button" value="Write To File" tabindex="5" onclick="WriteToFile(document.forms['form1'].outputFile.value),reset()">

</Body>
</HTML>[/CODE]


The script does not scan all existing folders in the given path, but only the files in the given directory, if you'd want this, you'll have to addapt it a little...

Have fun with it ! ?

Thanks to everybody who helped me too earlier...
Copy linkTweet thisAlerts:
@whsauthorFeb 15.2005 — Thanks a lot! I get this error, when I try the page out (in IE 6.0)

Type mismatch: 'diaplayList'

Is there something I am doing wrong?

Thanks again,

WHS
Copy linkTweet thisAlerts:
@rodentjeFeb 15.2005 — It works fine here...

I'll attach it...

This is what you have to do:

1. first textarea: enter a foldername: f.i. c: for desktop or c:folder

(2.) hit the List Files button if you want to see them in the second area (this is optionally, works if you skip this too)

3. third textarea: enter an output filename: f.i. c:folderlist.txt

4. hit the Write To File button

regards

[upl-file uuid=8d79689f-f7e7-419c-9082-07a6924814a0 size=3kB]get filenames from folder.html.txt[/upl-file]
Copy linkTweet thisAlerts:
@whsauthorFeb 16.2005 — Ah, now it works fine. I must have copied it over wrong before.

Would it be possible to modify this to display individual files? I.e., if the file list could be a clickable menu, and the selected files could then be saved to a location?

Thanks a lot for all of your help so far!

WHS
Copy linkTweet thisAlerts:
@rodentjeFeb 16.2005 — you've got me there, maybe somebody else knows how...
Thanks a lot for all of your help so far![/QUOTE]
you're welcome
Copy linkTweet thisAlerts:
@whsauthorFeb 16.2005 — That's not a big deal, I really appreciate your help!

WHS
Copy linkTweet thisAlerts:
@whsauthorFeb 18.2005 — Okay, I think I'm really very close to bridging the gaps in my "app." I have two remaining problems. Here's a full explanation, for anyone that can help:

I'm hoping to make a nice interface for users to connect to a specific directory in a USB device (for when they go to different computers) - this is just for fun, I'm not with the developer. Any way, I have an app that can get the list of files, and I have buttons that could launch or save the files.

Gap #1 - the script that gets the list of files cannot output to a <select> item list. i.e. I'm trying to get this code:


<Script Language=JavaScript>

function insertList(){

fileList1 = CreateFileList('H:iPod_ControlMusicF00')

fileList2 = CreateFileList('H:iPod_ControlMusicF01')

fileList3 = CreateFileList('H:iPod_ControlMusicF02')

fileList4 = CreateFileList('H:iPod_ControlMusicF03')

document.forms.Form1.listField.value = fileList1+fileList2+fileList3+fileList4;

}

window.onload=insertList;

</Script>

<Script Language=VBScript>

Function CreateFileList(folderSpec)

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FolderExists(folderSpec) Then

Set currFolder = fso.GetFolder(folderSpec)

Set nFile = currFolder.Files

For Each isFile in nFile

nameStr = nameStr & isFile.name & vbCRLF

Next

CreateFileList = nameStr

Set fso = Nothing

Exit Function

End If

CreateFileList = Nothing

Set fso = Nothing

End Function

</Script>
[/QUOTE]





To produce this kind of output:


<select id='test' onChange="getFilter(listitem)" size=5>

<option value="X:pathtofilefile">file

<option value="X:pathtofilefile">file

</select>
[/quote]


Gap #2: Then, I'm trying to get this code:


<script type="text/JScript">

function getFilter(listitem){

var object = "";

var listValue = getListValue(listitem);

document.formCategory.submit(listValue);

//alert(listValue);

}

function getListValue(list){

var listValue="";

if (list.selectedIndex != -1) {

listValue = list.options[list.selectedIndex].value;

listValue = removeSpaces(listValue);

}

return (listValue);

}

function ReadIt() {

var filename = listitem;

var fso, a, ForReading;

output = "";

ForReading = 1;

fso = new ActiveXObject('Scripting.FileSystemObject');

file = fso.OpenTextFile(filename, ForReading, false);

try{

while(true){

output+=file.readline()+"n";

}

} catch(Exception){}

output += "<!-- HTML Code Encoded By RoDeNtJe ! -->";

file.Close();

return output;


}

</script>
[/quote]


Along with this button code:


<button onclick="ReadIt()">open selected</button>
[/quote]


To launch the file that is selected in the <select> above.

Okay, that's a lot of junk. Thanks for reading. If there is any part of this that you can provide insight into, I would be much obliged. This has been an interesting project.

WHS
Copy linkTweet thisAlerts:
@rodentjeFeb 18.2005 — to let a button do multiple things, just do something like this:

<button onclick="function1(),function2(vars),...">open selected</button>

i noticed you used the original code i've made, i don't think that you want this in your file:

output += "<!-- HTML Code Encoded By RoDeNtJe ! -->";

that was for a html encoding script...

i don't know how you could open the text file to display the result, nor do i know how to make the clickable list you want...

sorry, i hope i was of any help

regards
Copy linkTweet thisAlerts:
@whsauthorFeb 20.2005 — Okay, I just can't get it to work, and I'm not sure what's wrong. This is what I have:



<Form name='Form1' height="100%">

<p align="center">


<script type="text/JScript">

function getFilter(listitem){

var object = "";

var listValue = getListValue(listitem);

document.formCategory.submit(listValue);

//alert(listValue);

}

function getListValue(list){

var listValue="";

if (list.selectedIndex != -1) {

listValue = list.options[list.selectedIndex].value;

listValue = removeSpaces(listValue);

}

return (listValue);

}

function ReadIt() {

var filename = listitem;

var fso, a, ForReading;

output = "";

ForReading = 1;

fso = new ActiveXObject('Scripting.FileSystemObject');

file = fso.OpenTextFile(filename, ForReading, false);

try{

while(true){

output+=file.readline()+"n";

}

} catch(Exception){}

file.Close();

return output;


}

</script>


<select id='test' onChange="getFilter(listitem)" size=5 style="height: 100%; width:100%;" onfocus="top.js._CM_OnFocusField(window,this)" name="musiclist" multiple>

<option value="C:Music3 - Beautiful Day.mp3">03 - Beautiful Day.mp3

<option value="C:Music8. I Will Follow.mp3">8. I Will Follow.mp3

</select>

</p>

<span>

<button onclick="ReadIt(listitem)">open selected</button>

</form>

[/quote]


WHS
Copy linkTweet thisAlerts:
@rodentjeFeb 20.2005 — you've put in this:
<button onclick="ReadIt([B]listitem[/B])">open selected</button>[/QUOTE]

but the function ReadIt doesn't know what to do with the variable since it's just function ReadIt(and nothing here) {[/QUOTE]

so perhaps change it to function ReadIt(listitem){...

I also think you didn't define the variable listitem, you use a few times function a(listitem){... but you don't define what listitem is, you should add somewhere something like var listitem = document.forms['form1'].whatever.value or whatever you want it to be

could you tell me a little more about this:
onfocus="top.js._CM_OnFocusField(window,this)" [/QUOTE]

doesn't it need a file top.js??? could you post your entire script in a zip or something? it would be much easier to have a look at

greetz
Copy linkTweet thisAlerts:
@whsauthorFeb 21.2005 — rodentje,

Thanks a lot for your continued help through all of this. Warren86 just sent me a script that completely does everything I was looking for.

I'm really amazed by the amount of help I received on this forum. I really appreciate it!

Best,

WHS
Copy linkTweet thisAlerts:
@rodentjeFeb 21.2005 — could you post the file warren has given you, i'm interested in it too...

or email it to [email][email protected][/email]

thnx!

I hope i could be of any help...
Copy linkTweet thisAlerts:
@Warren86Feb 21.2005 — <HTML>

<Head>

<Script Language=JavaScript>

var shortName = new Array();
var pathStr = new Array();

function createSelect(){

fileList1 = CreateFileList('C:\Windows\Desktop\Music Suite\Rock 1\')
fileList2 = CreateFileList('C:\Windows\Desktop\Music Suite\Rock 2\')
completeList = fileList1+fileList2;
completeList = completeList.split(/rn/)
for (i=0; i<completeList.length; i++)
{
shortName[i] = completeList[i].match(/[^/\]+$/);
pathStr[i] = completeList[i].replace(shortName[i],"")
}
isList = document.forms.Form1.dynList;
nOptions = shortName.length;
for (i=0; i<nOptions; i++)
{
isData = new Option(shortName[i],completeList[i]);
isList.add(isData,isList.options.length);
}
}

function playSelect(isVal){

if (isVal != "")
{
document.Player.filename = isVal;
document.Player.play();
}
}

window.onload=createSelect;


</Script>

<Script Language=VBScript>

Function CreateFileList(folderSpec)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(folderSpec) Then
Set currFolder = fso.GetFolder(folderSpec)
Set nFile = currFolder.Files
For Each isFile in nFile
nameStr = nameStr & folderSpec & isFile.name & vbCRLF
Next
CreateFileList = nameStr
Set fso = Nothing
Exit Function
End If
CreateFileList = ""
Set fso = Nothing
End Function


</Script>

</Head>

<Body>

<Table Width=650 Height=50 Border="0" Align="center" Cellspacing="5" Cellpadding="10">

<TR>

<TD align='right'>

<Form name='Form1'>

<Select name='dynList' onchange="playSelect(this.value)">

<option value="" selected> Choose a Song </option>

</Select>

</Form>

</TD>

<TD>

<OBJECT ID="Player" WIDTH=170 HEIGHT=45

CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">

<PARAM NAME="BufferingTime" VALUE="10">

<PARAM NAME="AudioStream" VALUE="-1">

<PARAM NAME="Volume" VALUE="-400">

</OBJECT>

</TD>

</TR>

</Table>

</Body>

</HTML>
Copy linkTweet thisAlerts:
@Warren86Feb 21.2005 — For some reason, this site has eliminated one from the end of the folder paths. There should be two slashes at the end, , not one.
Copy linkTweet thisAlerts:
@rodentjeFeb 21.2005 — Nice piece of work warren !

Thank you for your quick reply !
Copy linkTweet thisAlerts:
@rodentjeFeb 21.2005 — Hi warren,

i'm trying to personalise it a bit to my needs, but i can't seem to reset the document.forms.Form1.dynList

i've added a checkbox, and an textarea, the textarea gives the folder and if the checkbox is checked, the filenames in the current folder will be appended in the existing list, if unchecked, the list should reset, and only the files from the current folder are shown in the list...

I'm also having problems with extracting the value of the list, i thought it was document.forms.Form1.dynList.value, but the generated txt file seems to be blank ?

This is what i have so far: (sorry about the td mess, i just used frontpage to have an idea how to arrange it, and saved it accidently, i'll try to clean that up later):

<HTML>

<Head>

<Script Language=JavaScript>

var shortName = new Array();

var pathStr = new Array();

function createSelect(){

if(document.forms.Form1.checkbox.checked==true){

/*for(i=0; i<document.forms.Form1.dynList.length;i++){

document.forms.Form1.dynList.remove(i);

}*
/

alert(document.forms.Form1.checkbox.value);

}

alert("test"+document.forms.Form1.checkbox.value);

var s=document.forms['Form1'].folder.value;

if(s.charAt(s.length)!='' && s.length > 3){s+="";}

fileList1 = CreateFileList(s)

//fileList2 = CreateFileList('C:WindowsDesktopMusic SuiteRock 2')

//completeList = fileList1+fileList2;

completeList = fileList1;

completeList = completeList.split(/rn/)

for (i=0; i<completeList.length; i++){

shortName[i] = completeList[i].match(/[^/]+$/);

pathStr[i] = completeList[i].replace(shortName[i],"")

}

isList = document.forms.Form1.dynList;

nOptions = shortName.length;

for (i=0; i<nOptions; i++){

isData = new Option(shortName[i],completeList[i]);

isList.add(isData,isList.options.length);

}

}



function playSelect(isVal){



if (isVal != ""){
document.Player.filename = isVal;
document.Player.play();
}

}

//window.onload=createSelect;

window.onunload=function(){

alert("Thanks for using this script !!!");

}

function WriteToFile(output) {

var filename = output;

var text = document.forms.Form1.dynList.value;

var drvpath = filename.charAt(0)+':'+'';

var fso = new ActiveXObject('Scripting.FileSystemObject');

var d = fso.GetDrive(drvpath);

if(fso.DriveExists(d.DriveLetter)==true){

if(d.IsReady){

if(fso.FolderExists(getFolder(output))){

if(fso.FileExists(output)){

input_box=confirm("Are you sure you want to replace the selected file?");

if (input_box==true){

var file = fso.CreateTextFile(filename, true);

file.WriteLine(text);

file.Close();

confirm('List Succesfully Created !!!');

}

}

else{

var file = fso.CreateTextFile(filename, true);

file.WriteLine(text);

file.Close();

confirm('List Succesfully Created !!!');

}

}

else{

input_box=confirm("The folder doesn't exist, do you want to create it?");

if (input_box==true){

var path = getFolder(filename);

var index = 4;

var index2 = 4;

var temp2=4;

do{

index = path.indexOf('',temp2);

index2 = filename.indexOf('.');

var folder = filename.substring(0,index+1);

if(!fso.FolderExists(folder) && index!=-1){

var file2 = fso.CreateFolder(folder);

}

temp2=index+2;

}while(index!=-1)

var file = fso.CreateTextFile(filename, true);

file.WriteLine(text);

file.Close();

confirm('List Succesfully Created !!!');

}

}

}

else alert("The selected drive isn't ready !!!");

}

else alert("The selected drive doesn't exist !!!");

}

function getFolder(s){

var index = s.indexOf('.');

var i = index;

var spil=true;

do{

i--;

if(s.charAt(i)==''){

index=i;

spil=false;

}

}while(spil==true);

return s.substring(0,index+1);

}

</Script>

<Script Language=VBScript>

Function CreateFileList(folderSpec)

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FolderExists(folderSpec) Then

Set currFolder = fso.GetFolder(folderSpec)

Set nFile = currFolder.Files

For Each isFile in nFile

nameStr = nameStr & folderSpec & isFile.name & vbCRLF

Next

CreateFileList = nameStr

Set fso = Nothing

Exit Function

End If

CreateFileList = ""

Set fso = Nothing

End Function

Function checkExist(s)

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FolderExists(s) Then

CreateFileList(s)

Exit Function

End If

MsgBox "The folder "+s+" does not exist..."

Set fso = Nothing

End Function

</Script>

</Head>

<Body>

<Table Width=650 Height=50 Border="0" Align="center" Cellspacing="5" Cellpadding="10">

<TR>

<TD align='right' width="415">

&nbsp;<p>&nbsp;</p>

<p><Form name='Form1'>

<textarea id="folder" style="width:420; height:20" size="1" tabindex="1" name="S1" rows="1" cols="20"></textarea><p>

Check the box to append the new data to the existing filelist:

<input type="checkbox" name="checkbox" value="ON" tabindex="2"></TD>

<TD width="180">

&nbsp;<p>&nbsp;</p>

<p>

<input type=button value="List Files" tabindex="3" onclick="checkExist(document.forms['Form1'].folder.value),createSelect()"></TD>

</TR>

<tr>

<TD align='right' width="415">

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;

<Select name='dynList' onchange="playSelect(this.value)">

<option value="" selected> Choose a Song </option>

</Select>

</p>

<p>&nbsp;</p>

<p>&nbsp;</TD>

<TD width="180">

<p>

&nbsp;<p>

&nbsp;<p>

<OBJECT ID="Player" WIDTH=170 HEIGHT=45

CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">

<PARAM NAME="BufferingTime" VALUE="10">

<PARAM NAME="AudioStream" VALUE="-1">

<PARAM NAME="Volume" VALUE="-400">

</OBJECT>

<p>

&nbsp;<p>

&nbsp;</TD>

</tr>

<TR>

<TD align='right' width="415">

Enter the full filename of the file you wish to output the list:<p>&nbsp;<textarea id="outputFile" style="width:75%" size="30" tabindex="4"></textarea></TD>

<TD width="180">

&nbsp;<input type="button" value="Write To File" tabindex="5" onclick="WriteToFile(document.forms['Form1'].outputFile.value)"></TD>

</TR> </Form>

</Table>

</Body>

</HTML>

Thanks in advance !
Copy linkTweet thisAlerts:
@Warren86Feb 21.2005 — rodentje:

To "reset" a select list, set its length to zero, well in this case, 1, so that that "Choose a Song" isn't lost. Sorry, but I can't speak to the other things you are doing.

document.forms.Form1.dynList.length = 1;

Okay?
Copy linkTweet thisAlerts:
@rodentjeFeb 21.2005 — Thanks for your quick reply!

The resetting part works fine now, i've got two questions left, how can i get the value of the list in a string? and if i have that string, how can i delete the first line i.e. choose a song, or is it better to delete this in the list before converting it to a string?

Greetings, RoDeNtJe
Copy linkTweet thisAlerts:
@Warren86Feb 22.2005 — You can step through the length of the list. You can work with this example:

<HTML>

<Head>

<Script Language=JavaScript>

var listStr = "";

function getAllVals(isForm){

nSongs = isForm.dynList;
for (i=1; i<nSongs.length; i++)
{
//alert(nSongs[i].value);
listStr += nSongs[i].value +","
}
alert(listStr)
}


</Script>

</Head>

<Body>

<Form name='Form1'>

<select name='dynList'>

<option selected value='0'>Make a selection</option>

<option value='Hello'>1st</option>

<option value='Good Bye'>2nd</option>

<option value='Happy New Year'>3rd</option>

</select>

<br><br>

<input type=button value="Test" onclick="getAllVals(this.form)">

</Form>

</Body>

</HTML>
Copy linkTweet thisAlerts:
@rodentjeFeb 22.2005 — thanks, looks so simple in the end ?

one thing left, it seems to be that the n for a new line doesn't work here, it generates a square sign (can't copy it here, here it does jump to the next line if i paste the sign ?), how can i jump to the next line then?

function generateString(filelist){

var s = "";

var list;

for (i=0; i<filelist.length; i++){

list[i] = filelist[i].match(/[^/]+$/);

}

for(i=0; i<(list.length-1); i++){

s+=list[i+1].value+"n";

}

return s;

}



why does it gives an error in the line list[i] = filelist[i].match(/[^/]+$/); telling me that this method isn't supported by this object, you used it earlier without problems, or do i use it wrongly to get the filenames?



regards
Copy linkTweet thisAlerts:
@Warren86Feb 22.2005 — rodentje:

Oh, you know, I fought with that many hours, but, recently, I saw that Ultimater figured that out. There is some HexDec string you can use. But, when I saw that thread, I didn't copy his code. I just said to myself, well, somebody got it.

You may even want to just search his posts, for say, the last 3 weeks. It's in there.

Or, contact him. I'm certain he will reveal the secret.

I have no idea what you are doing, in whole, but I'm glad I helped.
Copy linkTweet thisAlerts:
@Warren86Feb 22.2005 — rodentje:

You are trying to "strip out" the file name too early.

The "value" of each item in the select list contains the entire path/file name string.

Try, stripping it out as you create the string. Something like this:

for(i=0; i<(list.length-1); i++){

tmp = list[i+1].value;

tmp = tmp.match(/[^/]+$/);

s+=tmp;
Copy linkTweet thisAlerts:
@rodentjeFeb 22.2005 — here is the thread you were talking about, but i can't seem to find their solution...

[URL]http://www.webdeveloper.com/forum/showthread.php?s=&threadid=56150[/URL]

function generateString(filelist){

var s = "";

var list;

for (i=0; i<filelist.length; i++){

//list[i] = filelist[i].match(/[^/]+$/);

}

/*for(i=0; i<(list.length-1); i++){

s+=list[i+1].value+'&#129';

}*
/

for(i=0; i<(filelist.length-1); i++){

s+=filelist[i+1].value+&#129;

}

return s;

}



could you tell me what's wrong with list[i] = filelist[i].match(/[^/]+$/);? why isn't this working?



i'll send you my total file, so you know what you are helping me with!



i really appreciate your help warren!



[upl-file uuid=bf15ee96-706b-4b76-94e0-03c1dbe57c32 size=6kB]test.html.txt[/upl-file]
Copy linkTweet thisAlerts:
@rodentjeFeb 22.2005 — thanks, this works fine now too ?

just the new line issue worked out and i think it's finished...

i'll read the thread once over again, maybe i'll figure it out

thank you!
Copy linkTweet thisAlerts:
@Warren86Feb 22.2005 — I told you about stripping the file name. I didn't see that part initially, in that post of yours, so then I made a subsequent post.

Maybe you didn't see it yet.

Yes, that's the thread.

I saw later in it, that he said, Ultimater, that he solved it. I don't what else to say, except to contact him.

You're welcome. I apppreciate your courtesy, but I have to call it a night.

Take care, good luck with your project.
Copy linkTweet thisAlerts:
@rodentjeFeb 22.2005 — according to ultimator, the character for a new line is %0A, but s+=tmp+'%0A'; just results in something like filename1%0Afilename2%0A...

so not really a nw line, is their something wrong with the s+=tmp+'%0A';

i think i'll go to bed too, it's almost finished now, just this one issue...

thanks for your help!

good night
Copy linkTweet thisAlerts:
@rodentjeFeb 22.2005 — got it working now, thanks for all your help!

for those who want to take a look at it, check the attachment

[upl-file uuid=2d0463bd-8083-45f2-b869-dffb1383354a size=6kB]generate filelist & play music.html.txt[/upl-file]
Copy linkTweet thisAlerts:
@whsauthorFeb 22.2005 — Is the only way to make this script work on other peoples' computers via the internet to make the site a "trusted site" on their browsers or lower their security settings?

Thanks,

WHS
Copy linkTweet thisAlerts:
@rodentjeFeb 22.2005 — i guess so, after all the script is making an fso object (fyle system object) which requires activeX, which require lower security settings and so on...

a bit normal i guess, doesn't it sound a bit dangerous to let a script output files (not only in txt extension!!!) without letting the user allow the script, even norton displays a message here alerting this is a potential danger...
Copy linkTweet thisAlerts:
@whsauthorFeb 22.2005 — Eh, that's good enough for me.

Thanks,

WHS
Copy linkTweet thisAlerts:
@firerMar 25.2005 — Hi rodentje,

i downloaded the Attachment: get filenames from folder.html.txt

and tried running it on my workstation.

I am unable to execute the file successfully via localhost.(able to do so via desktop,workstation)

I have already set the security setting in IE to the minimum.

Can you please advise me on what to do.

Error Message : ActiveX component cannot create scripting.FileSystemObject
Copy linkTweet thisAlerts:
@rodentjeMar 25.2005 — Hi,

you have to make this site trusted...

Go to Extra>Internet Options>Security>Trusted Websites>Websites and add the site... (Dunno if these are the correct english terms, because I'm using a dutch ie)

Enjoy the script!
Copy linkTweet thisAlerts:
@firerMar 27.2005 — Hi rodentje,

I followed your instructions and tested it on two workstations.

One succeed while the other failed.

May i know if theres any other settings that need to be changed

Both followed the same instructions but achieved different result.

Thanks a lot
Copy linkTweet thisAlerts:
@rodentjeMar 31.2005 — Hmmm...

If you've got activeX and javascript enabled in your security settings and you've made the site trusted, things 'should' work in my opinion

sorry if i was of no help

regards, RoDeNtJe
Copy linkTweet thisAlerts:
@rodentjeApr 01.2005 — Warren, could you help me on this one, or anyone else?

If I have two folders (c:test and c:testtest) and in the first folder one file (1.txt) and in the second folder two files (2.txt and 3.txt) and I do the folowing:

Let the checkbox unchecked, enter directory c:testtest and press list files, the list has now two files in it, namely 2.txt and 3.txt

if i then enter the directory c:test and press list files, the list now should only have one file, namely 1.txt but it contains two files, namely 1.txt and 3.txt, so the script doesn't reset the list

I think something in the vbscript part has to be altered, but i don't know vbscript...

A similar error occurs with the checkbox checked...

In attachement you can find the html page...

Thanks in advance !

regards, RoDeNtJe

[upl-file uuid=d58cfe26-0058-49e2-8c18-c826def2006a size=6kB]Generate FileList & Play Music.html.txt[/upl-file]
Copy linkTweet thisAlerts:
@rodentjeApr 03.2005 — please?
Copy linkTweet thisAlerts:
@7studApr 03.2005 — I think something in the vbscript part has to be altered, but i don't know vbscript...[/QUOTE]I thought you were doing the same thing with js and an FSO?

It seems like Warren already gave you one example of how to erase the list. See if this example helps:
[CODE]<body>

<form name="f" method="post" action="">
<select id="s0" name="s0">
<option value="0">choose</option>
<option value="1">text1</option>
<option value="2">text2</option>
</select>
</form>

<div><input type="button" id="b0" name="b0" value="use select.length=1 to erase the options" /></div>
<div><input type="button" id="b1" name="b1" value="use removeChild() to erase the options" /></div>
<div><input type="button" id="b2" name="b2" value="use Options = null to erase the options" /></div>

<div>&nbsp;</div>

<div><input type="button" id="b3" name="b3" value="add to list: appendChild()" /></div>
<div><input type="button" id="b4" name="b4" value="insert a new Option() at index=3" /></div>

</body>
</html>[/CODE]

&lt;html&gt;
&lt;head&gt;&lt;title&gt;&lt;/title&gt;
&lt;/style&gt;&lt;script type="text/javascript" language="javascript"&gt;
&lt;!-- Hide from browsers without javascript

window.onload=function()
{
document.getElementById("b0").onclick = set_length;
document.getElementById("b1").onclick = remove_nodes;
document.getElementById("b2").onclick = null_Options;

<i> </i>document.getElementById("b3").onclick = append_Child;
<i> </i>document.getElementById("b4").onclick = new_Option;
};

function set_length()
{
document.getElementById("s0").length = 1;
}

function remove_nodes()
{
var sel = document.getElementById("s0");

<i> </i>for(var i = 1, len = sel.options.length; i &lt; len; i++)
<i> </i>{
<i> </i> sel.removeChild(sel.options[1]); //array elements automatically shift down one position so
<i> </i> //can't use i for the position--it will go out of
<i> </i> //bounds at some point. So, just delete the same position
<i> </i> //everytime.
<i> </i>}
}

function null_Options()
{
var opts = document.getElementById("s0").options;
for(var i = 1, len = opts.length; i &lt; len; i++)
{
opts[1] = null; //array elements are automatically reordered, and they shift down
//one position, so you can't use i for the index position--it will
//go out of bounds at some point. So, just set the same position
//to null everytime.
}

}

function append_Child()
{
var new_option = document.createElement("option");
var sel = document.getElementById("s0");
new_option.setAttribute("value", sel.options.length); //use the position in the array
//to set the value and text(next line)
var text = document.createTextNode("choice" + sel.options.length);
new_option.appendChild(text); //appends to the end of the list

<i> </i>sel.appendChild(new_option);
}

function new_Option()
{
var new_option = new Option("choice3", "3");
document.getElementById("s0").options[3] = new_option;
}

// End hiding --&gt;
&lt;/script&gt;
&lt;/head&gt;
Copy linkTweet thisAlerts:
@rodentjeApr 04.2005 — Thanks for your reply, but I don't think the question is "how do i reset a list"...

if the checkbox is checked, the list shouldn't be erased, instead new data shoul be added to the list

if it isn't checked, this list should be erased and new data should replace the old data...

see:
[CODE]function createSelect(){
if(!document.forms.Form1.checkbox.checked){
document.forms.Form1.dynList.length = 1;
}[/CODE]

but even when i change the code and let the 'if' drop, so everytime createSelect loads, dynList.length is set to 1...

and still the data in the list is incorrect (first c:testtest (see previous post), then c:test results in a list containing 1.txt and 3.txt, but this should result in only 1.txt)

even more, if the checkbox is checked and first i enter c:testtest and then c:test, this results in a list containing 2.txt 3.txt 1.txt 3.txt, and this should result in 2.txt 3.txt 1.txt, so it's not about resetting the list, it's the variable with the content which is added to the list which should be resetted.

i thought this was nameStr but if i say nameStr = "" at the start of Function CreateFileList(folderSpec), this doesn't help too...

so i'm quite out of ideas ?
Copy linkTweet thisAlerts:
@7studApr 04.2005 — but even when i change the code and let the 'if' drop, so everytime createSelect loads, dynList.length is set to 1...

and still the data in the list is incorrect (first c:testtest (see previous post), then c:test results in a list containing 1.txt and 3.txt, but this should result in only 1.txt)[/QUOTE]
So, are you saying that you set the list length to 1, and then miraculously other entries appear in the list? There are no functions that add entries to the list? If there are functions that add items to the list, don't you think there could be an error in one of those?

this results in a list containing 2.txt 3.txt 1.txt 3.txt, and this should result in 2.txt 3.txt 1.txt,[/QUOTE]What did the list look like before that operation?
Copy linkTweet thisAlerts:
@rodentjeApr 04.2005 — sorry, little correction, if i say:
[CODE]function createSelect(){
if(!document.forms.Form1.checkbox.checked){
document.forms.Form1.dynList.length = 1;
}[/CODE]

this results in 2.txt 3.txt 1.txt 3.txt

if i say:
[CODE]function createSelect(){
document.forms.Form1.dynList.length = 1;[/CODE]

this results in 1.txt 3.txt

it should result in 2.txt 3.txt 1.txt or 1.txt 2.txt 3.txt, i'm not sure if the data is added at the end of the list or add the beginning... if i look at the code, i guess it should be added at the beginning, so i guess 1.txt 2.txt 3.txt

and yes i think it's possible that the error is in another function, but i really don't know where !

thanks!
Copy linkTweet thisAlerts:
@nusenseApr 04.2005 — Firefox can use ActiveXObjects.
Copy linkTweet thisAlerts:
@rodentjeApr 04.2005 — ?
Copy linkTweet thisAlerts:
@rodentjeApr 15.2005 — Anyone figured it out yet?
Copy linkTweet thisAlerts:
@rodentjeApr 25.2005 — Isn't there anyone who wants to help me out with it? Just have a look at the code and tell me which part is wrong, so I might try to fix it myself...
Copy linkTweet thisAlerts:
@rodentjeJun 11.2005 — Hi,

I've corrected the error myself...

You can find it up and running [URL=http://users.pandora.be/bartdiricx/JScript/Generate%20FileList%20&%20Play%20Music.html]here[/URL].

The actual script is to be found in the attachment.

Please note that you have to make sure that you either run the script from your hd or you make the site trusted (Extra>Internet Options>Security>Websites) in order to generate the .txt file containing the generated list.

Greetings

[upl-file uuid=7bae9c00-aa13-4875-82a5-7c01c5db4c4f size=7kB]Generate FileList & Play Music.txt[/upl-file]
Copy linkTweet thisAlerts:
@rodentjeNov 21.2005 — Is there a way of doing the exact same thing (getting a list of the files in a directory on a given directory) with files on a server (if given an url)?
×

Success!

Help @whs spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...