Player in a different computer, how to avoid lose file path

I just buy a commercial license because I will do an installation. I will copy all the folder with assets, however, I will use a player in a different computer. Do I need to change path of all my files, or touch recognize the folder project, or is there a way to collect my project in order to dont lose any file path?

thks in advance.

I answered this question you posted in another thread here:

Another good way is to use project.paths as asset path management :

paths → dict (Read Only) :

A dictionary which can be used to define URL-syntax path prefixes, enabling you to move your media to different locations easily. This dictionary is saved and loaded in the .toe file. Example: Run project.paths['movies'] = 'C:/MyMovies' , and reference it with a parameter expression: movies://butterfly.jpg . To manually convert between expanded and collapsed paths, use tdu.collapsePath() and tdu.expandPath from the Tdu Module, for example tdu.expandPath('movies://butterfly.jpg') expands to C:/MyMovies/butterfly.jpg . Alternately, to enable you to have different media locations on different machines, you can put a JSON file in the same folder as your .toe that gets read on startup. It would contain something like { "project.paths": { "movies": "M:/MyMovies" } } . If your .toe file is called MyProject.10.toe , the JSON file must be called MyProject.Settings.json . (Setting project.paths with python in your .toe overrides the JSON file.)

Hi Yeataro,

Thks for your reply. Its interesting your way to solve the path issue. Actually I solved it with nettoyeur solution, I think is easier, however I’ll keep your post for further projects.

Solution:
The best thing to do is to use relative paths for all your assets. This way it is easy to move the project to another machine. Everything works the same for TouchPlayer. The folder where the .toe file resides is called the project folder. Place all your assets in subdirectories of this folder, for instance a folder “assets” which has another subdirectory “movies”. Then load your assets in the Movie File in TOP(and others) by using a file path like: assets/movies/mymovie.mov

1 Like