Python command unreal.EditorAssetLibrary.does_directory_exist() always returns false when script ran on startup

Hi All

I am trying to write an automatic import python script and as part of that I check to see if a file exists using the below python command:

unreal.EditorAssetLibrary.does_directory_exist()

When I ran the script through the python cml it worked correctly and found the desired directories but when I added the script as a startup script in the project settings every time I ran:

unreal.EditorAssetLibrary.does_directory_exist()

it returned false even if the file existed. I think the startup scripts are running before the unreal file system is created so the command can never find anything. Has anyone else had this issue and if you have can you help? Do I need to initialise something? Thanks for the help.

Try absolute path