Solved

Move File From Folder To Another using PowerBuilder

Posted on 2009-07-01
5
3,108 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
Comment Utility
make TRUE in filecopy syntax
0
 
LVL 1

Author Comment

by:Deyhim
Comment Utility
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
Comment Utility
what return the value
0
 
LVL 14

Expert Comment

by:shru_0409
Comment Utility
check the FileExists if yes than delete
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 250 total points
Comment Utility
Try this....

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

Filemove(sourfile,targetfile)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now