J
jain2005k
How can I rename a .jpg file in server using asp( not asp.net) code
I use the FileSystemObject to do that like
Fso = Server.CreateObject("Scripting.FileSystemObject");
Fso.MoveFile(Server.MapPath("1.jpg"),(Server.MapPath("2.jpg"));
but it does not work properly
when I use the the code in my local system it also not worked.
But when I put full filepathpath instead of mapPath in my local
system. Like
Fso.MoveFile("c:\\inetpub\\1.jpg", "c:\\inetpub\\2.jpg")
It worked properly.
May anyone help me to do this with Server.MapPath() method.
I use the FileSystemObject to do that like
Fso = Server.CreateObject("Scripting.FileSystemObject");
Fso.MoveFile(Server.MapPath("1.jpg"),(Server.MapPath("2.jpg"));
but it does not work properly
when I use the the code in my local system it also not worked.
But when I put full filepathpath instead of mapPath in my local
system. Like
Fso.MoveFile("c:\\inetpub\\1.jpg", "c:\\inetpub\\2.jpg")
It worked properly.
May anyone help me to do this with Server.MapPath() method.