1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| <html>
<HEAD>
<TITLE>Simple copie</TITLE>
</HEAD>
<body>
<script language="VBScript">
Public Function envoyer_OnClick()
MsgBox "envoyer_OnClick"
Msgbox form1.fichier.value
Msgbox "test"
Msgbox document.form1.fichier.value
ind=InStrRev(document.form1.fichier.value, "\")
Msgbox ind
'On retire le nom du script
racine=Left(document.form1.fichier.value,ind)
Msgbox racine
Set FSCopie = CreateObject("Scripting.FileSystemObject")
FSCopie.CopyFile document.form1.fichier.value, racine & "\test\test.xls", true
Msgbox "yata"
End function
</script>
<div align="center" >
<table width="100%">
<tr bgcolor="#249BFF">
<td><div align="left" >Envoyez votre fichier excel</div></td>
</tr>
<tr>
<td width="52%" align="center">
<form name="form1" method="post" enctype="multipart/form-data"">
<input type="file" name="fichier" />
</form>
<input type="submit" name="envoyer" value="envoyer" />
</td>
</tr>
</table>
</div>
</body>
</html> |
Partager