T
Tank
I have had this post up here when i was trying to figure out how to
make leading zeros and have been able to fudge that to work. I am now
have trouble getting the loop that makes the folders to start fresh
after the .jpg section of the move images code. this will be
essential to make the whole thing work. Please help. Even if you
just write out the solution. I am beggin. I am desperate. Please
help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>File transfer</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<table width="75%" border="0">
<tr>
<td>
<script language='javascript'>
folder = window.prompt('starting folder','default');
picnumber = window.prompt('pictures taken?','default');
f2 = parseFloat(folder);
p2 = parseFloat(picnumber);
/*adds the amount of photos taken to the starting folder number to
ensure proper amount of folders are present and tells user what the
starting folder and end folders are*/
varAdd = f2+p2-1;
varImg = p2;
var9 = '000';
var99 = '00';
var999 = '0';
var9999 = '0000';
document.write('Starting folder is <b>',f2,'</b><br>');
document.write('Ending folder should be <b>' + varAdd +
'</b><br><br>');
/*Commands used to bring system to standard for file transfer*/
document.write('cd..<br>')
document.write('cd documents and settings\\christopher
neu\\desktop<br>')
document.write('mkdir transfer<br>')
document.write('cd transfer<br>')
/*copies files from smartmedia to transfer folder*/
document.write('copy d:\\dcim\\100_fuji\\*.jpg<br>')
/*calculates and writes proper amount of folders in the transfer
folder via the "mkdir" command to properly transfer files*/
for (count1=f2;count1<=varAdd;count1++)
if (count1 <=9)
document.write('mkdir',var9999 + count1 +'<br>');
else if (count1 <=99)
document.write('mkdir',var9 + count1 +'<br>');
else if (count1 <=999)
document.write('mkdir',var99 + count1 +'<br>');
else if (count1 <=9999)
document.write('mkdir',var999 + count1 +'<br>');
else
document.write('mkdir' + count1 +'<br>');
/*moves pictures into proper folders. This is where the problem is.
I need to put the count that produced the folders after .jpg and have
it start fresh and continue till the move images count is done.
Perhaps this can be done with a function but i can not figure it out.
I can not figure out functions at all actually. */
for (count=1;count<=varImg;count++)
if (count <=9)
document.write('move dscf',var9 + count +'.jpg <br>');
else if (count <=99)
document.write('move dscf',var99 + count +'.jpg <br>');
else if (count <=999)
document.write('move dscf',var999 + count +'.jpg <br>');
else
document.write('move dscf' + count +'.jpg <br>');
</script>
</td>
</tr>
</table>
</body>
</html>
make leading zeros and have been able to fudge that to work. I am now
have trouble getting the loop that makes the folders to start fresh
after the .jpg section of the move images code. this will be
essential to make the whole thing work. Please help. Even if you
just write out the solution. I am beggin. I am desperate. Please
help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>File transfer</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<table width="75%" border="0">
<tr>
<td>
<script language='javascript'>
folder = window.prompt('starting folder','default');
picnumber = window.prompt('pictures taken?','default');
f2 = parseFloat(folder);
p2 = parseFloat(picnumber);
/*adds the amount of photos taken to the starting folder number to
ensure proper amount of folders are present and tells user what the
starting folder and end folders are*/
varAdd = f2+p2-1;
varImg = p2;
var9 = '000';
var99 = '00';
var999 = '0';
var9999 = '0000';
document.write('Starting folder is <b>',f2,'</b><br>');
document.write('Ending folder should be <b>' + varAdd +
'</b><br><br>');
/*Commands used to bring system to standard for file transfer*/
document.write('cd..<br>')
document.write('cd documents and settings\\christopher
neu\\desktop<br>')
document.write('mkdir transfer<br>')
document.write('cd transfer<br>')
/*copies files from smartmedia to transfer folder*/
document.write('copy d:\\dcim\\100_fuji\\*.jpg<br>')
/*calculates and writes proper amount of folders in the transfer
folder via the "mkdir" command to properly transfer files*/
for (count1=f2;count1<=varAdd;count1++)
if (count1 <=9)
document.write('mkdir',var9999 + count1 +'<br>');
else if (count1 <=99)
document.write('mkdir',var9 + count1 +'<br>');
else if (count1 <=999)
document.write('mkdir',var99 + count1 +'<br>');
else if (count1 <=9999)
document.write('mkdir',var999 + count1 +'<br>');
else
document.write('mkdir' + count1 +'<br>');
/*moves pictures into proper folders. This is where the problem is.
I need to put the count that produced the folders after .jpg and have
it start fresh and continue till the move images count is done.
Perhaps this can be done with a function but i can not figure it out.
I can not figure out functions at all actually. */
for (count=1;count<=varImg;count++)
if (count <=9)
document.write('move dscf',var9 + count +'.jpg <br>');
else if (count <=99)
document.write('move dscf',var99 + count +'.jpg <br>');
else if (count <=999)
document.write('move dscf',var999 + count +'.jpg <br>');
else
document.write('move dscf' + count +'.jpg <br>');
</script>
</td>
</tr>
</table>
</body>
</html>