how about "net use $drive > c:\temp\mappings.txt" to create a mappings.txt and "net use $drive >> c:\temp\mappings.txt" to add the info to mappings.txt