Hi, I'm tinkering with site_file.js and menus.xml to add a 'backup file'
functionality to the DW MX 2004 right mouse menu. What I'm trying to do (in
English) is: Right click a file Get the path and filename Check if there is an
'archive' folder in the current selection's folder. If not make one Duplicate
the file, adding '_BKYYYY_MM_DD' to the end of the file name Move the
duplicated file to the archive folder I can get the file name and even make a
new folder, but the folder is called 'untitled' and I'm stuck in the site
window w/ 'untitled' selected. I want to rename the folder to archive and move
on w/ the code but I can't figure out how to rename the folder. Here's what
I've got so far... //right mouse click ends up here in site_file.js when user
clicks 'Backup File' else if (itemID == 'backup') //get the year, m, d to
append to file name { var theDate = new Date(); var theMonth =
theDate.getMonth() + 1; if (theMonth < 10) { theMonth = '0' + theMonth;
} var theDay = theDate.getDate(); if (theDay < 10) { theDay =
'0' + theDay; } var theYear = theDate.getYear(); theYear =
theYear + 1900; var append = '_BK' + theYear + '_' + theMonth + '_' +
theDay; //get the file name.... var filePathAndName =
site.getSelection(); //go through the array of file names and separate
filename from path for (var i = 0; i < filePathAndName.length; i++) {
var getSlash = filePathAndName.lastIndexOf('/'); var fileName =
filePathAndName.substr(getSlash + 1, filePathAndName.length - getSlash); var
pathName = filePathAndName.substr(0, filePathAndName.length - fileName.length);
\\try to make 'archive' folder --this is where it all falls apart!! if
(site.makeNewFolder('archive')){ alert('Created archive folder');
}else{ alert('Unable to create archive folder'); } //code to
rename and copy files to go here... } } Thanks for your help! Steve