I’m writing plugins for sketch up. I cannot find a simple way to append a text file from the My Documents directory on Windows. The problems I am having are:
- opening with the current username
- differences between Windows versions.
I need the code to open a file in append mode in My Documents on Windows 7 on a 32bit machine.
EDIT:
Default location of user’s documents is:
On Windows 98 and Windows Me
C:\My DocumentsOn Windows 2000 and Windows XP
%USERPROFILE%\My DocumentsOn Windows Vista and later
%USERPROFILE%\DocumentsYou can find the right path on Non-English systems in Windows Registry: