Kitty82 Posted September 6, 2004 Posted September 6, 2004 Hi! I come from germany and so my english is very bad - but I'll try to explain my problem, that can anybody help me :? I search help in german-forums, but nowbody wanted to helped me - i hope, you wont disappoint me too :cry: My job is: i have a JScript-File. I don't know really what it is do, but i have to add to a function, which check (only!!) all the filename (which are in the same folder like the script). It have to test if "settings.txt" embodied in the filename. If yes, it have to save the filename in a variable and then it will be finish-worked, if not the script have to test the next file on his filename. How can i code it?? I have a try, but I don't know if it is right: var filesearch = "settings.txt"; var search_c = "<br>"; var filename, pos, pos_c, repeat; var flist = ShowFolderFileList(folderspec); repeat =1; do{ pos_c = flist.indexOf(search_c, pos); pos = flist.indexOf(filesearch, pos+1); if(pos != -1 || pos_c != -1) { if(pos < pos_c) { filename = flist.slice(0, pos+12); document.forms[0].input.value=filename; } else { filename = flist.slice(pos_c+4, pos+12); document.forms[0].input.value=filename; } } else { repeat =0; } if(repeat == 1) { create_setupfile(filename); //the filename will be finished-worked } }while(repeat == 1); Please - help me :oops: Greetings Kitty Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.