Move multiple files insidde a loop? not possible?
As we dont have a move folder option in mmf2, im trying to do it using the move file action and theres a few files in each folder, ut they dont move inside a loop.
Say you have a folder with 5 bmp's in names:
1.bmp , 2.bmp , 3.bmp , 4.bmp , 5.bmp
And at the start of frame you start a loop 5 times!
On loop, move file (foler path) + Loopindex + ".bmp"
The file paths are 100% correct ive checked them several times, ive even got it to create list of the source file moved and a list for destination file path and it list all 5 correct, yet the files dont move nowhere!!
Anyone now why or how?
Andy
Re: Move multiple files insidde a loop? not possible?
I don't think file actions work inside of the fast loop system.
Fastloops are an idea that came around long after the engine of MMF was built.
I would suggest you build a loop using regular MMF events to handle the file moving - that should work fine and you can do some error checking to make sure your files move.
Re: Move multiple files insidde a loop? not possible?
'dont move nowhere' OK
I would suggest using a 'counter' variable instead of the 'loop index'.
I have had a lot of headaches over files and loops and have found creating a counter fixes most issues. There are billions of other ways around problems you will come up against with mmf, just experiment. It might be that you don't have rights to move the files to the destination folder. I would look for other ways to get the files where you want. You know you can pipe the MOVE command to move the files where you want. Have you tried this?
Re: Move multiple files insidde a loop? not possible?
The fastloop index does start at 0 .... So its possible that is the problem. I forgot that when I tested it out.
When I get to the office and try it ... maybe it will work.
With the file object if you get an error (like a files does not exist) you need to clear the error before you try to use it again.
So if its looking for file named 0.bmp and it doesn't exist that will generate an error.
So many loop index + 1 is something to try.
Re: Move multiple files insidde a loop? not possible?
HI thanbks for the replys, yea i am aware it has a 0-based index and so made sure i integrated that, like i said, i got it so on every loop it adds the "source file path" and the "destination file path" to a list so i could check the paths the file was using within the loop and they all were correct, but the files just werent moving. but if i set it so it just moves a single file (so with out loopindex("name") as the file names (source & destination) it moves the 1 file, in the loop. but wont do it if it has to use the loopindex in the filename?
I dont quite understand what you mean when you refer to "pipe the move commmand"?
Gib
Re: Move multiple files insidde a loop? not possible?
I'm making an example this evening to show how to move, copy and delete recurrsively