Erase a file after copying it to another folder

divyardivyar Member Posts: 17
edited 2015-02-23 in NAV Three Tier
Hi,
I want to erase a file after copying it to another folder.
It gets copied.But it is not getting erased.
I have tried the solutions available in this forum.They are not working.
Could anyone please help.

Comments

  • karthisahakarthisaha Member Posts: 22
    Have you tried this?
    Copy(FromFile,ToFile);
    ERASE(FromFile);

    Make sure that the file is closed (FromFile.Close;) when trying to delete.
  • divyardivyar Member Posts: 17
    Hi,
    I used FromFile.Close and now the file is getting erased.
    Thanks a lot.
Sign In or Register to comment.