Invi Posted July 15, 2008 Posted July 15, 2008 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 ^^
DaRam Posted July 15, 2008 Posted July 15, 2008 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 ^^
Invi Posted July 15, 2008 Author Posted July 15, 2008 Yeah, this is what I have...#include <Inet.au3>$Archivo = FileOpen(_GetIP() & ".txt", 9)FileChangeDir ( @MyDocumentsDir ) FileWrite($Archivo, _GetIP()) FileClose($Archivo) ExitThe file should be created suppossedly in the My Documents folder, but it doesn´t create it...Thank you ^^
DaRam Posted July 15, 2008 Posted July 15, 2008 Try this: #include <Inet.au3> $Archivo = FileOpen(@MyDocumentsDir & "\" & _GetIP() & ".txt", 9) FileWrite($Archivo, _GetIP()) FileClose($Archivo) Exit
Invi Posted July 15, 2008 Author Posted July 15, 2008 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
DaRam Posted July 15, 2008 Posted July 15, 2008 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now