title: How to dynamically change Firefox Driver preferences in selenium
body: <p>i want to download multiple file and save into different locations</p>
  
  <pre><code>FirefoxProfile profile = new FirefoxProfile();
  profile.setPreference("browser.download.folderList", 2);
  profile.setPreference("browser.download.dir", "D:\\");
  profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/msword");
  
  System.setProperty("webdriver.chrome.driver","C:/Program Files/Mozilla Firefox/firefox.exe");
  f   =new FirefoxDriver(profile);
  
  for(int i = 0; i&lt;10; i++){
  
  //I want to change download dir name here with count**
  
  
  }
  </code></pre>