5 Replies Latest reply on Nov 19, 2013 7:05 AM by Sumit_Garg

    How to call a variable file path in javascript

    Abhi_apple

      Hi,

       

      My objective is to capture a file path on mac and windows. However, this file path gets changed with various users.

       

      For example the path is:

       

      c:\user\username\AppData\Local\Temp\myfolder------> this is for windows machine

       

      /users/username/Library/Application Support/tempfolder/Temporary Files/-------> this is for mac machine

       

      As you can see, the path will be same for all the machines. Only the difference will be in searching the user and username at the start of file path. Rest folders will remain same on all the machines.

       

      Is there any grep pattern through which I can call this complete path in a variable for all the users.

       

      Any help will be appreciated.

       

      Regards,

       

      Abhi