Re: MoveFile problem
From: Curt_C [MVP] (software_AT_darkfalz.com)
Date: 01/31/05
- Next message: McKirahan: "Re: replacing carriage returns?"
- Previous message: Curt_C [MVP]: "Re: Connection String/Network Library"
- In reply to: Patrice: "MoveFile problem"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 08:54:22 -0600
verify all your values first. Make sure that they are all what you expect.
Write em out to the screen.
If that works try hardcoding a simple file with the objects you indicated,
see what happens.
Then combine the two....
Basic troubleshooting methodology.
-- Curt Christianson Site & Scripts: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com "Patrice" <manitoo@videotron.ca> wrote in message news:lMqLd.41023$Rw4.662668@weber.videotron.net... > Hi, > I want to move images from a folder to specific subfolders. > The script below generates the following error: > a.. Error Type: > Microsoft VBScript runtime (0x800A01A8) > Object required:'[undefined]' > > <% > sub moveImagesToFolder(Folder) > dim fs,fo,x,text,Foldername,fm,f1 > set fs=Server.CreateObject("Scripting.FileSystemObject") > set fo=fs.GetFolder(Server.MapPath(Folder)) > for each x in fo.files > text=Len(x.Name)-4 > Foldername=Left(x.Name,text) > set f1 = fs.GetFile(x) > > '/////here is where the error is targeted: don't know why!//// > set > fm=fs.MoveFile(f1,"C:\Inetpub\wwwroot\"&Folder&"\"&Foldername&"\") > > set fm=nothing > set f1=nothing > next > set fs=nothing > set fo=nothing > end sub > > %> > > Can someone help? > Thx > >
- Next message: McKirahan: "Re: replacing carriage returns?"
- Previous message: Curt_C [MVP]: "Re: Connection String/Network Library"
- In reply to: Patrice: "MoveFile problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|