10/05/19 02:24:22 9yUyKYhb0
>>108
一応できたから置いておく。ろくにテストしてないから穴がないかはわからず。
Script:JScript
fs = new ActiveXObject('Scripting.FileSystemObject');
cSel = WScript.Col(WScript.Env('Selected'));
for (i = 0; i < cSel.Count; i++) {
if (fs.FileExists(cSel.Item(i))) {
f = fs.GetFile(cSel.Item(i));
} else if (fs.FolderExists(cSel.Item(i))) {
f = fs.GetFolder(cSel.Item(i));
}
name = fs.GetBaseName(cSel.Item(i));
ext = fs.GetExtensionName(cSel.Item(i));
if (ext) {
ext = '.' + ext;
}
str = '';
for (j = 0; j < 10; j++) {
str += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
}
f.Name = name + str + ext;
}