Solved

Move File From Folder To Another using PowerBuilder

Posted on 2009-07-01
5
3,270 Views
Last Modified: 2013-12-26
How i can Move File from folder to another using powerbuilder without Confirmation of replacement
i used FileMove and FileCopy but always when the same file already into Folder .. Black window will open (Command window) to Confirm that how i can remove this confirmation and replace always...


Thanks.
0
Comment
Question by:Deyhim
  • 3
5 Comments
 
LVL 14

Expert Comment

by:shru_0409
ID: 24752720
make TRUE in filecopy syntax
0
 
LVL 1

Author Comment

by:Deyhim
ID: 24752755
i did but its not deleted .. i dont know why

this is my code

      
//using COPY then Delete if its copied correctly
move_flag=filecopy(string(for_folder),string(to_file),true);

if move_flag=-1 or move_flag=-2 then
      messagebox("Error","please check the folders");
      return 0;
      
else // correct copy
      
      FileDelete ( string(for_folder) );
end if
0
 
LVL 14

Expert Comment

by:shru_0409
ID: 24752851
what return the value
0
 
LVL 14

Expert Comment

by:shru_0409
ID: 24753146
check the FileExists if yes than delete
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 250 total points
ID: 24778070
Try this....

If FileExist(targetfile) Then
     FileDelete(targetfile)
End If

Filemove(sourfile,targetfile)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question