Hi,
I am new to Xojo. I have to move a number (around 100 to 300) of files stored in a folder to a set of subfolders (around 30 to 60) acording to a certain patern. The files are 250Mb or so in size and my code is the following:
// Move files to subfolders
For j = 1 To number_of_stacks
slice_counter = 0
For i = j To number_of_files Step number_of_stacks
slice_counter = slice_counter + 1
// move file
source_file = new FolderItem(source_folder +"\" + Format(i, "000000") + ".tif", folderItem.PathTypeNative)
// to subfolder
destination_file = new FolderItem (source_folder +"\" + Str(j) + "\"+ Str(slice_counter ) + ".tif", folderItem.PathTypeNative)
source_file.MoveFileTo(destination_file)
Next i
Next j
If I run the code on exactly the same set of files and subfolders repeated times, the result is the spected one 90% of the time but for an unknown reason, the 10% of the time a file fails to move into its corresponding subfolder.
I am really stuck with this, any Ideas?
Thanks for your help!!
Manuel