How to dynamically change the path to store commerce files depending on some product variables?
You need to use the Token with File (Field) Paths and Pathauto modules.


  Note: File (Field) Paths extends the token module by adding Node tokens, without this module, you will not be able to use the node fields as tokens.


Then edit your file field.



We then use Pathauto to fix names with spaces. Ex: If the album name is "Hello World" the path/folder name will change to /hello-world/