2 Replies Latest reply on Sep 17, 2015 9:12 AM by RESlyder

    Using Folder.userData to get user's name? (Windows/CS5)


      I am looking for a way for our designers to digitally "sign off" on graphics as they export them, which we do via javascript. Thanks to other posts in this forum, I know how to add text to a textbox via JS, but am having trouble getting the user name info.


      I was hoping I could somehow trace the username from one of the Folder options, but it always traces back as a truncated file path that doesn't include the username portion.


      So for example when I use this:


      my result is:



      The info I need is where that pesky ~ is! Any ideas on how to get it to give me the full path name?


      I have tried:



      All but .parent give me the same "~/AppData/Roaming" result.

      .parent just gave me "~/AppData"

      .parent.parent gave me "~"

      When I went to .parent.parent.parent it gave me "/c/Users"


      Is the username property blocked somehow from being returned? Is there a way around that if so?


      Tech Specs: Using Windows 7, Illustrator CS5 64-bit