Rizuki Posted May 27, 2020 Share Posted May 27, 2020 Hellow pro, master and mister can someone help me how can i create a file with random name Example i want to create 50 or 100 file with random name using lua how can i make please help me Link to comment Share on other sites More sharing options...
ItsSC Posted May 27, 2020 Share Posted May 27, 2020 math.randomseed(os.time()) for i = 1 , 50 do randName = string.char(math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122)) io.open("/sdcard/Download/"..randName,"w"):write("This is mallicious file.") end Link to comment Share on other sites More sharing options...
Rizuki Posted May 27, 2020 Author Share Posted May 27, 2020 2 minutes ago, ItsSC said: math.randomseed(os.time()) for i = 1 , 50 do randName = string.char(math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122)) io.open("/sdcard/Download/"..randName,"w"):write("This is mallicious file.") end Thank master Link to comment Share on other sites More sharing options...
Rizuki Posted May 27, 2020 Author Share Posted May 27, 2020 31 minutes ago, ItsSC said: math.randomseed(os.time()) for i = 1 , 50 do randName = string.char(math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122)) io.open("/sdcard/Download/"..randName,"w"):write("This is mallicious file.") end Master... Why file not created when i change to some location and also get error when changing to some location to?.. Link to comment Share on other sites More sharing options...
ItsSC Posted May 27, 2020 Share Posted May 27, 2020 14 minutes ago, Rizuki said: Master... Why file not created when i change to some location and also get error when changing to some location to?.. No idea what you changed. Link to comment Share on other sites More sharing options...
Rizuki Posted May 27, 2020 Author Share Posted May 27, 2020 1 minute ago, ItsSC said: No idea what you changed. math.randomseed(os.time()) for i = 1 , 50 do randName = string.char(math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122)) io.open("/storage/emulated/0/"..randName,"w"):write("This is mallicious file.") end Location only i change Link to comment Share on other sites More sharing options...
ItsSC Posted May 27, 2020 Share Posted May 27, 2020 4 minutes ago, Rizuki said: math.randomseed(os.time()) for i = 1 , 50 do randName = string.char(math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122),math.random(97,122)) io.open("/storage/emulated/0/"..randName,"w"):write("This is mallicious file.") end Location only i change It works fine here. No error at all. Link to comment Share on other sites More sharing options...
Rizuki Posted May 27, 2020 Author Share Posted May 27, 2020 3 minutes ago, ItsSC said: It works fine here. No error at all. Sorry bfo its working but file.created is hide hahaha but still thank you master i dont know why is hide when i only use gg to load lua a see it but in my storage is not appearing Link to comment Share on other sites More sharing options...
Question
Rizuki
Hellow pro, master and mister can someone help me how can i create a file with random name
Example i want to create 50 or 100 file with random name using lua how can i make please help me
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.