Solved

Move File From Folder To Another using PowerBuilder

Posted on 2009-07-01
5
3,452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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 and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

737 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