Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


TrainerOrigin - wrong folder

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AntonVit
Advanced Cheater
Reputation: 0

Joined: 25 Jan 2014
Posts: 73

PostPosted: Sat Mar 24, 2018 3:22 am    Post subject: TrainerOrigin - wrong folder Reply with quote

Hello there,

Is anybody know why trainer cant create folder in directory where is trainer.exe file, if name of it folder has space?

Code:
function CEButton1Click(sender)
os.execute("mkdir "..TrainerOrigin.."\\Tool_Settings")
end


It script can create folder with name "Tool_Settings" if i put trainer in folder
C\\Some_folder\\trainer.exe
or
C\\Somefolder\\trainer.exe

But cant create folder if i use
C\\Some folder\\trainer.exe
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25287
Location: The netherlands

PostPosted: Sat Mar 24, 2018 5:23 am    Post subject: Reply with quote

you need to add quotes to the mkdir command

you're executing
Code:

mkdir C:\Some Folder\Tool_Settings

which tells mkdir to create the folders "c:\Some" and "Folder\Tool_Settings"

you need to execute:
Code:

mkdir "C:\Some Folder\Tool_Settings"


easiest way to do that is:
Code:

os.execute([[mkdir "]]..TrainerOrigin..[[\Tool_Settings"]])

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
AntonVit
Advanced Cheater
Reputation: 0

Joined: 25 Jan 2014
Posts: 73

PostPosted: Sat Mar 24, 2018 5:39 am    Post subject: Reply with quote

Dark Byte wrote:
you need to add quotes to the mkdir command

you're executing
Code:

mkdir C:\Some Folder\Tool_Settings

which tells mkdir to create the folders "c:\Some" and "Folder\Tool_Settings"

you need to execute:
Code:

mkdir "C:\Some Folder\Tool_Settings"


easiest way to do that is:
Code:

os.execute([[mkdir "]]..TrainerOrigin..[[\Tool_Settings"]])


Many thanks, work fine now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites