Export["filename.txt","contents string"]