fs.CopyFile
Jeg har forsøgt mig med noget fs.CopyFile men kan ikke få det til at virke. Jeg får fejlen...Microsoft VBScript runtime error '800a0035'
File not found
/oddsrus/dcsx.asp, line 82
Linje 82: fs.CopyFile f_fra_fil, f_til_fil
-----------------------------
Uddrag fra koden:
-----------------------------
' Get variables
medie = Request.Querystring("medie")
til = Request.Querystring("til")
fra = Request.Querystring("fra")
'FileSystem-objektet
Set fs = CreateObject("Scripting.FileSystemObject")
'Byg cover-filnavne
sti = "/oddsrus/cover/" & medie & "/"
f_fra_fil = sti & fra & "f.jpg"
b_fra_fil = sti & fra & "b.jpg"
cd_fra_fil = sti & fra & "cd.jpg"
e1_fra_fil = sti & fra & "e1.jpg"
e2_fra_fil = sti & fra & "e2.jpg"
f_til_fil = sti & til & "f.jpg"
b_til_fil = sti & til & "b.jpg"
cd_til_fil = sti & til & "cd.jpg"
e1_til_fil = sti & til & "e1.jpg"
e2_til_fil = sti & til & "e2.jpg"
f_fil_hit = server.mappath(f_fra_fil)
b_fil_hit = server.mappath(b_fra_fil)
cd_fil_hit = server.mappath(cd_fra_fil)
e1_fil_hit = server.mappath(e1_fra_fil)
e2_fil_hit = server.mappath(e2_fra_fil)
'Tjek Front
if fs.FileExists(f_fil_hit) = True then
f_hit = True
cover_hit = True
end if
'Tjek Back
if fs.FileExists(b_fil_hit) = True then
b_hit = True
cover_hit = True
end if
'Tjek CD
if fs.FileExists(cd_fil_hit) = True then
cd_hit = True
cover_hit = True
end if
'Tjek Ekstra(1)
if fs.FileExists(e1_fil_hit) = True then
e1_hit = True
cover_hit = True
end if
'Tjek Ekstra(2)
if fs.FileExists(e2_fil_hit) = True then
e2_hit = True
cover_hit = True
end if
if cover_hit = True then
if f_hit = True then
fs.CopyFile f_fra_fil, f_til_fil
end if
'' if b_hit = True then
'' fs.CopyFile(b_fra_fil, b_til_fil)
'' end if
'' if cd_hit = True then
'' fs.CopyFile(cd_fra_fil, cd_til_fil)
'' end if
'' if e1_hit = True then
'' fs.CopyFile(e1_fra_fil, e1_til_fil)
'' end if
'' if e2_hit = True then
'' fs.CopyFile(e2_fra_fil, e2_til_fil)
'' end if
end if
