How to change the location or to rename the ‘Resources’ folder with Dynamic Web TWAIN

Scenario: For customers who are using Dynamic Web TWAIN 10 or above versions, to change the location of the 'Resources' folder, or to rename it, please following the steps below:


Say the original Resources folder is at '../{Project Directory}/Resources', and you want to change it to '../{Project Directory}/Newfolder/ResourcesTest'.

  1. Please make sure the structure inside 'Resources' folder stay unchanged.
  2. Change the relative path in your page where you reference to the js files, for example:
  3. <script src="Resources/dynamsoft.webtwain.initiate.js"></script>
    // or your own operation js file
    <script src="Scripts/DWTSample_BasicScan.js"></script>
    <script src="Resources/dynamsoft.webtwain.config.js"></script>

    Modify as below:

    <script src="Newfolder/ResourcesTest/dynamsoft.webtwain.initiate.js"></script>
    // or your own operation js file
    <script src="Scripts/DWTSample_BasicScan.js"></script>
    <script src="Newfolder/ResourcesTest/dynamsoft.webtwain.config.js"></script>
  4. Same change needs to be done in dynamsoft.webtwain.config.js file. Add/uncomment the following line (by default it's on line 22), then change 'Resources' (to 'New folder/ResourcesTest' as in this case):
  5. Dynamsoft.WebTwainEnv.ResourcesPath = 'Resources';

    Modify as below:

    Dynamsoft.WebTwainEnv.ResourcesPath = 'Newfolder/ResourcesTest';

You are all set now. If you still have trouble with the resourcesPath, please contact us via support[at]

Is this page helpful?

Leave a Reply

Your email address will not be published.