Hi,
I would like to enter a folder path like this
C:\Documents and Settings\chuckl arge\Desktop
and get this
C:\\Documents and Settings\\chuck large\\Desktop\ \
this is what i have tried but can not get it right
function preparePath(fol derPath)
{ var len = folderPath.leng th;
if(folderPath[len - 1] != '\\')
{ folderPath += '\\';
}
return folderPath.repl ace(\\, '\\\');
}
sourceFolderPat h = preparePath("C: \Documents and
Settings\chuckl arge\Desktop");
Any Help is appreciated,
Chuck
I would like to enter a folder path like this
C:\Documents and Settings\chuckl arge\Desktop
and get this
C:\\Documents and Settings\\chuck large\\Desktop\ \
this is what i have tried but can not get it right
function preparePath(fol derPath)
{ var len = folderPath.leng th;
if(folderPath[len - 1] != '\\')
{ folderPath += '\\';
}
return folderPath.repl ace(\\, '\\\');
}
sourceFolderPat h = preparePath("C: \Documents and
Settings\chuckl arge\Desktop");
Any Help is appreciated,
Chuck
Comment