Answered
save all open documents in psd
save all open documents in psd
in the same path as the original files
and rename the source file from test.jpg to test.psd

save all open documents in psd
in the same path as the original files
and rename the source file from test.jpg to test.psd

That that code did not what you wanted has been established.
What was the problem with the code DmitryEgorov had provided?
try this:
for (var i=0; i<app.documents.length; i++) {
var doc = app.activeDocument = app.documents[i],
f = doc.fullName
doc.saveAs (File(f.path + "/" + decodeURI(f.name).replace(/\.\S+$/, "") + ".psd"))
f.remove()
}* i think I understand what the geppettol66959005 needs
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.