Bonjour,
Merci beaucoup Pascal pour cette solution j'en été loin. J'ai essayé et je n'arrive pas avec les fichier suivant :
Fichier d'appel en html
<html>
<head>
</head>
<body>
<h1>Test d'estanpillage de fichier</h1>
<a href="estanpillage1.asp">fichier à estanpiller</a>
<%response.write dt%>
</body>
</html>
Fichier estanpillé
<%
function padLeft( data , length, padding )
padLeft = right( String(length, padding) & data ,length)
end function
'-------------Création d'une instance objet ---------------
Dim tst
Set tst=CreateObject("Scripting.FileSystemObject")
'Avant la modif
'Dim FicText
'Set FicText=tst.OpenTextFile("C:\Documents and Settings\Propriétaire\Mes documents\Mes sites Web\monsiteweb9\noticeattente\recup.htm",8,true)
'Estanpillage de fichier
dim dt, newFileName
dt = date newFileName = year(dt) & padLeft( month(dt), 2 , "0" ) & padLeft( day(dt), 2 , "0" )
response.write dt
set newFileName=nothing
set tst=nothing
%>
Comment faire ?
Alphonse
-------------------------------
Réponse au message :
-------------------------------
> salut,
>
> Le code suivant crée un chaine de la forme YYYYMMDD.
> Je le fais de cette manière car lors de l'affichage dans l'explorer, ça apparaît trié.
>
> function padLeft( data , length, padding ) > padLeft = right( String(length, padding) & data ,length) > end function > > dim dt, newFileName > dt = date > newFileName = year(dt) & padLeft( month(dt), 2 , "0" ) & padLeft( day(dt), 2 , "0" ) > > |
>
>
> Pascal