Hi,
Is there a script able to search if a file exists no matter where in the pc?
I always have to specify a path, but what about I don't already know where the file I search is located?
Using the code above I can search if "text.txt" exists in C:/.
Using some more variables and a loop I menaged to search in every C: folders, but then?
Every C: folder has its own subfolder, how can I search even there?
Is there a script able to search if a file exists no matter where in the pc?
I always have to specify a path, but what about I don't already know where the file I search is located?
Code:
◆Script:var os = require("os")
: :$gameVariables.setValue(281, os.homedir())
◆Script:var x = $gameVariables.value(281)
: :var xArr = phrase.split("\\")
: :$gameVariables.setValue(288, (xArr[0]))
◆If:Script:require('fs').existsSync($gameVariables.value(288)+"/text.txt")
◆Commento:File exists
: :End
◆
:Else
Using the code above I can search if "text.txt" exists in C:/.
Using some more variables and a loop I menaged to search in every C: folders, but then?
Every C: folder has its own subfolder, how can I search even there?