Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Problem in copying files to the widows temp folder

  Asked By: Charlie    Date: Sep 05    Category: Java    Views: 741

i am using com.ms.win32.kernel32 library to copy files to system

Kernel32 k=new Kernel32();
int size=250;
StringBuffer sb=new StringBuffer(300);
String temp=sb.toString();
String Wintemp=temp.substring(0,temp.length()-1);

//Wintemp-->WindowsTempFolder eg:"D:/docume~1/softbe~1/local~1/temp/"

boolean r=k.CopyFile("D://index.html","Wintemp",false);
MessageBox.show(cacheEntryInfo.lpszLocalFileName+" result "+r);

if i am copying to other non-system folders,it gets copied
succesfully,but when trying with system folders it fails.

So anyone help me to fix this problem.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Problem in copying files to the widows temp folder Or get search suggestion and latest updates.