If your script has been saved, this might be done using rs.LastLoadedScriptFile() but it is not yet implemented in rhinoscript syntax. Alternatively you could use this on windows to retrieve the script path with filename, then get the dirname from that:
import os
rp = os.path.realpath(__file__)
print os.path.dirname(rp)
@Alain could you please add rs.LastLoadedScriptFile() to rhinoscript syntax ?