Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 File checking
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jonny Tight Lips




PostPosted: Wed Oct 06, 2004 11:36 am   Post subject: File checking

Is there a comand that will alow a program to tell where itself is on the computer ie the file extention stuff (C:\\blabla\\blalala\\test.t) becasue when I transfer the program from onme computer to another I have to go and edit where all the files are so is there a way for the program to do that by itself?
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Wed Oct 06, 2004 12:31 pm   Post subject: (No subject)

I was going to suggest using Dir.Current but it seems that the function returns the path as a string using forward slashes instead of double back slashes, which must be utterly useless. Just so you know, when the file hasn't been saved anywhere (ie, just code pasted into the editor) it'll return "C:/".
Jonny Tight Lips




PostPosted: Wed Oct 06, 2004 3:10 pm   Post subject: (No subject)

That was the right thing I was looking for. The forward slash is the same as a double backslash so it works. Thanx for the help Coutsos
Mazer




PostPosted: Wed Oct 06, 2004 3:29 pm   Post subject: (No subject)

Whoa! You can use a single forward slash "/" instead of the double backslash "\\"! I never realised that, this is so cool.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: