Computer Science Canada Creating .txt on desktop |
Author: | chipanpriest [ Wed Dec 21, 2011 4:46 pm ] | ||
Post subject: | Creating .txt on desktop | ||
I am creating a program that creates a number of text files based on the user's input. What I need help with, is how to save the .txt files to the desktop because if you do what I did, it says that it cant find it because there is no folder named "desktop" in the turing folder. So if anyone could help me out, I would appreciate it.
|
Author: | DemonWasp [ Wed Dec 21, 2011 4:56 pm ] |
Post subject: | RE:Creating .txt on desktop |
The Desktop folder is actually located under your home folder. For example, mine would be C:\Users\DemonWasp\Desktop on Windows Vista/7 or C:\Documents and Settings\DemonWasp\Desktop on Windows XP and earlier. |
Author: | Tony [ Wed Dec 21, 2011 5:01 pm ] |
Post subject: | RE:Creating .txt on desktop |
Yeah, it would be kind of weird for the Desktop folder to be inside of the Turing folder ![]() (in specific -- relative vs. absolute path) |
Author: | ProgrammingFun [ Wed Dec 21, 2011 6:04 pm ] | ||
Post subject: | RE:Creating .txt on desktop | ||
Considering that it's always gonna be windows, you can try:
|
Author: | chipanpriest [ Wed Dec 21, 2011 6:30 pm ] |
Post subject: | RE:Creating .txt on desktop |
that didnt work lol but i got it to work on my computer i was just wondering if i could have gotten it to work on any computer |
Author: | ProgrammingFun [ Wed Dec 21, 2011 7:01 pm ] |
Post subject: | RE:Creating .txt on desktop |
You could always ask the user for the save/open path. ![]() |