Jump to content

Recommended Posts

Posted

Hi aggain, people.

I`m making a new programme, wich creates a text file, but it creates it into the Desktop, and I want that it will be created in the C:/ directory, and I have tried it a lot of time but i can´t do it anyway muttley it creates on the Desktop...

I tried using the FileChangeDir command, but I can´t make it work either...

So...how could I determinate the place where the file will be created? Thnx ^^

Posted

Post what you've got so far.

Hi aggain, people.

I`m making a new programme, wich creates a text file, but it creates it into the Desktop, and I want that it will be created in the C:/ directory, and I have tried it a lot of time but i can´t do it anyway muttley it creates on the Desktop...

I tried using the FileChangeDir command, but I can´t make it work either...

So...how could I determinate the place where the file will be created? Thnx ^^

Posted

Yeah, this is what I have...

#include <Inet.au3>

$Archivo = FileOpen(_GetIP() & ".txt", 9)

FileChangeDir ( @MyDocumentsDir )

FileWrite($Archivo, _GetIP())

FileClose($Archivo)

Exit

The file should be created suppossedly in the My Documents folder, but it doesn´t create it...

Thank you ^^

Posted

Try this:

#include <Inet.au3>
$Archivo = FileOpen(@MyDocumentsDir & "\" & _GetIP() & ".txt", 9)
FileWrite($Archivo, _GetIP())
FileClose($Archivo)
Exit
Thanks man, it works perfectly, sorry for my newbie question muttley

Erm...but the name of the file that is created is the Ip of the computer, and i would like to change the name, for example give as name "Hello", so it will be hello.txt

Posted

Serious? You do need to look at the help file sometime :)

$Archivo = FileOpen(@MyDocumentsDir & "\Hello.txt", 9)

Thanks man, it works perfectly, sorry for my newbie question muttley

Erm...but the name of the file that is created is the Ip of the computer, and i would like to change the name, for example give as name "Hello", so it will be hello.txt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...