nevermind i got it. if anyone wants it
{
string $text;
// create a prompt dialog to request the users name
string $result = `promptDialog
-title "save shot"
-message "shot number:"
-button "OK" -button "Cancel"
-defaultButton "OK" -cancelButton "Cancel"
-dismissString "Cancel"`;
// if OK pressed
if ($result == "OK") {
// query the entry typed by the user
$shot = promptDialog -query -text
;
string $fileName = $shot;
string $shot = $fileName;
string $path = "G:/XXXXXX_XX_XXXX/scenes/XXX_XXX_XXX/XXXXX/";
string $fullName = $path + $fileName;
file -rn $fullName;
file -s;
}
else {
print("cancelled");
}
}