[SOLVED] Copying, deleting and moving files as internal command

New to FreeBASIC? Post your questions here.
Post Reply
Laurens
Posts: 17
Joined: Mar 16, 2022 9:16
Location: Flevoland, the Netherlands

[SOLVED] Copying, deleting and moving files as internal command

Post by Laurens »

Hello all. My name is Laurens (from Flevoland, the Netherlands). I've started using FB recently, and now I'm converting some of my old applications from QB to FB. Thus far, everything goes well, except the following QB commands:

Code: Select all

Copy "source.ext" To "target.ext"
Move "source.ext" To "target.ext"
Kill "source.ext" 
I'd like to keep my apps as multi-platform as possible (using them in Windows 10 and Linux), therefore I prefer an internal command to do it, instead of a shell command using the system. I've been looking into the wiki and the forum, but haven't found a page containing the subject. Are there some internal commands wich can do the job?

Thanks in advance
Last edited by Laurens on Mar 21, 2022 17:12, edited 1 time in total.
fxm
Moderator
Posts: 12106
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Copying, deleting and moving files as internal command

Post by fxm »

see FILECOPY
see NAME
see KILL
Laurens
Posts: 17
Joined: Mar 16, 2022 9:16
Location: Flevoland, the Netherlands

Re: Copying, deleting and moving files as internal command

Post by Laurens »

Thanks a lot. Now it's working. At first I wondered why you put KILL over there, because the compiler didn't accept it, but it was a typo in the code from my hand.
Post Reply