Halo ,How Can I Make copy from all filles :from a directory with all sub filles. (Truebasic commands)

Halo support

What command is needed to copy all filles from some directory with all sub files.
From one drive to other drive.

Thanks a lot for


Best regards



Copying and moving files

Dave is correct, you can move ANY kind of file by opening it as "BYTE", and then use Rtarara's method to resave them somewhere else and then delete the old ones.

I use that idea to sort and move photos (jpegs, etc) from my camera.

Files don't have to be True Basic files. In fact, "True Basic files" themselves are nothing but plain old text (.txt) files. I always write my TB files in a text editor and save them with extension .txt; that way Windows Explorer will show previews of them.

Moving files that way is a slightly awkward way to have to do it. You must also create the individual Directories, and then resave the files in them. but it does work.

Mike C.

re: copying files

The short answer (as far as I can tell) is that you can't do this inside True Basic, at least not easily. Multiple file manipulation became more complicated once DOS disappeared since the various GUIs have different approaches. [I always found Mac file handling clumsy!]

I see no explicit commands for copying files. HOWEVER, if you are dealing with file types that TrueBasic understands, one might use the ExecLib.trc (128-130 in Manual) to read all the file names in both the main and subdirectories Exec_ReadDir and Exec_ClimbDir. You can use Exec_MkDir to create a new directory, but then you would have to read each file individually and then write that file into the new directory. In the end you could use Exec_RmDir to erase the old directory if desired.

The files would have to be TrueBasic types for the above to work.

In the end, unless someone else knows differently, I don't think this is something you want (or can) do from within a True Basic program.


I have not tried my self but

I have not tried my self but page 125 of the manual has a small sub routine that uses byte files to copy a file of any format. Try to use the advice from rwt to get the files in the folder and create a new folder and then use the sub routine from page 125 in a loop to copy them all.


re: copy files within TB

Dave and Mike have corrected me, you CAN copy files within True Basic and any type of file, but as everyone has noted, it is a clumsy process especially if you want to do whole directories. If you really need to do that kind of file handling, I would suggest searching for a 'free' utility program and then CHAIN to that program for the file manipulations and then return to the True Basic program.