Click here to Skip to main content
15,889,211 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all

I am copying file from one location to other with the help of this following JavaScript in my current running apps folder but it is not changing its created date and time after checking its property.
JavaScript
function copyfile()
{
  var scr = '<%=ConfigurationManager.AppSettings("source_filename")%>';
  var desc = '<%=ConfigurationManager.AppSettings("dest_filename")%>';
  fso = new ActiveXObject("Scripting.FileSystemObject");
  fso.CopyFile(scr, desc);

}
Posted
Updated 14-Nov-11 20:06pm
v2
Comments
Anuj Banka 15-Nov-11 2:10am    
Beacuse your code copy a file from one loaction to other.It is not creating the new file.If you will create a new file then it will show the time that you want
mayur csharp G 15-Nov-11 3:36am    
Can you please give me code to do as you suggest

This is expected behavior.

—SA
 
Share this answer
 
It will depend upon the file system you have on your OS (FAT16/32/NTFS)
check this link[^]
 
Share this answer
 
Comments
mayur csharp G 15-Nov-11 3:52am    
Dear all
location where i am copying file is my current running apps folder which i am runnig. I have tried some different, i copy file to some diffrent location like desktop and now it works fine with same code... now is it the reason that i am copying file to current running apps folder????

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900