Solved

Move File From Folder To Another using PowerBuilder

Posted on 2009-07-01
5
3,194 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse find/step into stored procedure 3 178
eclipse luna javeEE perspecive missing 5 96
MAC and PC - Cheap video editing tools 4 121
eclipse formatting 6 71
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…
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 and create keystrokes in Netbeans IDE 8.0 for Windows.

911 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

19 Experts available now in Live!

Get 1:1 Help Now