I think your problem is in trying to pass a variable between two different files. $$ is good as long as a file is open, but as far as I know (I've run into this) you would need to pass the variable as a Script Parameter to the other script (call the "other file" script from a script or script step from the "first" file). In other words, $$ won't pass between scripts in different files as a simple variable. If I'm incorrect, someone correct me!
Thank you RW, that is what I too have concluded...
Thank you for your thoughts and time,