in reply to windows app-data path

See $ENV{ APPDATA }


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: windows app-data path
by Rudolf (Pilgrim) on Nov 19, 2011 at 13:59 UTC

    momo33, Im not sure if this will help you but I use my perl scripts in XP and win7, and here are the things I use to find the correct paths.. good luck :)

    $user = getlogin(); # get username if(-e(-d("C:/users"))){$users = "users";} #check if exists elsif(-e(-d("C:/Documents and Settings"))){ $users = "Documents and Settings"; } $OS = $^O;

      This approach will fail for example on non-English Windows XP. For example German Windows XP has Dokumente und Einstellungen as the directory name.