Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Move File From Folder To Another using PowerBuilder

Posted on 2009-07-01
5
Medium Priority
?
3,760 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 750 total points
ID: 24778070
Try this....

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

Filemove(sourfile,targetfile)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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. …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
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.
Suggested Courses

609 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