How can i Read/write a file to a variable? (VXAce)

Out of curiosity, what did you do that didn't work before?

The example I sent is exactly the same as this:
#13
I don't know as well...
By moring am going to a windows tool called psr so we can know.
I don't know what happened, but #13 had the same result from #20 ...
No errors..
Also, can i write a variable in a file?
I don't know what happened, but #13 had the same result from #20 ...
No errors..
I don't understand you well, could you explain it better?
I posted just one example on "13".
The "20" just redirect it back to the "13"

Also, can i write a variable in a file?
Yes, just remove the text and put the command for the variable that is already in the example "Read File".
Working fine!
What was the cause of the problem?
I guess i tryed to make a frank-dead-and-alive dude and mixed alot of codes by mistake..
(Sorry)

NOTE: Jump line
<
obj.write("\r") go yes
obj.write(\r) go no
#===================
#(Write fiile)
#===================
<
$game_variables[1]=file.readlines[2]
#===================
#(Write on variable third
#Line of file)
#===================
>
>
Double-post notice: @LezianD

Please edit your post instead of posting immediately after yourself.
Can i read\create files in the desktop?
I didn't understand your question, do you mean the "Desktop" folder?
Example:
C:\users\myuser\Desktop
Yis
See this:
Like i open a bat file that creates a file?
Out of curiosity, why did you do a Batch Script?
Spoiler: Before anyone blames me.
I just said that you could study the "environment variables" to use in the RmVXA Script.

Good luck
Out of curiosity, why did you do a Batch Script?
Spoiler: Before anyone blames me.
I just said that you could study the "environment variables" to use in the RmVXA Script.

Good luck
Sorry... i really didn't understood anything at you meant, can you make some exemples please?
Path to save directly to the users desktop.
You don't need to create anything to know the drive letter (C:, D:, etc).
So instead of giving a complete path like:
C:\Users\myuser\Desktop

Just:
Code:
%userprofile%\Desktop

I don't want to look boring, but you posted a tutorial teaching you a few things about it.
So I understood that at least I understood the basics on the subject.
Do not misunderstand me.
Sorry.. but i still didn't understand... sorry
I'm going to have to apologize, I tested it and really Windows environment variables don't work in RGSS or Ruby.
I'm going to study more, but I'm out of time, I'm going to leave some links here:

Complete:
Let's say that i get the player PC username (on legal ways) to a file, and from the file to the variable
any way that i can haunt the player a bit creating a a diretory with the user name (from the variable) to name the folder ? and maybe write some thing there?

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-read-write-a-file-to-a-variable-vxace.134798/