I am trying to find if a file exits in the root of the USB drive:
The problem I am facing is that navigating to the root of the USB drive (eg: F\:) when my AMS 8 application is installed in a sub-folder (eg: F:\NewApplication\) does not work with the _SourceDrive variable. According to the AMS destructions - sorry, instructions - _SourceDriveCode:Folder.SetCurrent(_SourceDrive); new_exist = File.DoesExist("new.ini"); if new_exist then Dialog.Message("Stop! There is a file already with this name", "You cannot write a file"); else Dialog.Message("Are you sure you want to write this file?", "You are about to write a file"); end
The drive that the AutoPlay application was run from (e.g. "C:" or "D:")
The full path to the folder that the AutoPlay application was run from (e.g. "C:\Downloads" or "D:").
In my example above, the script fails to find new.ini in the drive root, but finds it in the sub folder. Thus _SourceFolder and _SourceDrive do the same thing. Is this a USB drive issue?
I have tried setting the path ..\\_SourceDrive but that fails with an error, naturally enough.
How can I set a path below the folder the application is installed in?