Hi there
I need help passing extra arguments to one of the function in my script.
The code below is one of the functionality of the script and it creates Log Folder
function CreateNewLogSubDir()
{ var strSubdirName='';
strSubdirName=WScript.Arguments.Named.Item'New');
if('string'!=typeof(strSubdirName)||0==strSubdirName.length)
{ var strDate = new Date();
var iMonth =Number(strDate.getMonth()+1);
var sMonthPrefix = '';
if(Number(iMonth)<10)sMonthPrefix='0';}
strSubdirName=strDate.getFullYear()+'-';
strSubdirName+=sMonthPrefix+iMonth +'-'+
(strDate.getDate() < 10 ? '0':'')+(strDate.getDate());
I need to pass 4 arguments to the above script.
These arguments are values to input to the name of the newly created log folder and these are the information passed from SourceSafe Change Mgt Sys Arguments to pass are :
1)Enter Build
2)Enter Transaction Number
3)Enter Short Log Description
Ex: If i enter Build = 49834 and Transaction = 238113 and Short Description = TestingSample, then the newly created Folder should have the following name i.e. 2009-02-23-B-49834-T-238113-TestingSample
Is it possible to do this?.
Please guide me regards
I need help passing extra arguments to one of the function in my script.
The code below is one of the functionality of the script and it creates Log Folder
function CreateNewLogSubDir()
{ var strSubdirName='';
strSubdirName=WScript.Arguments.Named.Item'New');
if('string'!=typeof(strSubdirName)||0==strSubdirName.length)
{ var strDate = new Date();
var iMonth =Number(strDate.getMonth()+1);
var sMonthPrefix = '';
if(Number(iMonth)<10)sMonthPrefix='0';}
strSubdirName=strDate.getFullYear()+'-';
strSubdirName+=sMonthPrefix+iMonth +'-'+
(strDate.getDate() < 10 ? '0':'')+(strDate.getDate());
I need to pass 4 arguments to the above script.
These arguments are values to input to the name of the newly created log folder and these are the information passed from SourceSafe Change Mgt Sys Arguments to pass are :
1)Enter Build
2)Enter Transaction Number
3)Enter Short Log Description
Ex: If i enter Build = 49834 and Transaction = 238113 and Short Description = TestingSample, then the newly created Folder should have the following name i.e. 2009-02-23-B-49834-T-238113-TestingSample
Is it possible to do this?.
Please guide me regards