File move / copy function
Posted 30 November 2010 - 11:14 AM
I need a file copy/move function (preferably in scriptmaster ) written that has a progress bar pop up with a cancel button.
I am going to be coping a list of files from one hard drive to another. These files will be anywhere from 300MB to 6GB each.
Function Name: CopyFilesEx ( sourcePaths ; destinationPaths ; moveORcopy )
sourcePath: the paths of the files to copy.
destinationPath: the paths of where the file will copy or move to. I would also like this to rename the file to the one specified in the destinationPath
moveORcopy: this would either be specified with "move" or "copy" if it is move and the source and destination are on the same volume then the action should be a simple move operation. If the volumes are different I need the file copied and then the destination file deleted once the file has been successfully copied. Do not delete the source files until all the files are copied.
Progress Bar Details
Ideally I would like to insert a value list of file paths into the source and destination variables (it should stop and return an error if the two value lists are not the same length). There needs to be two progress bars, an overall progress of all the files and a progress bar of the current file.
Total File Size (GB) of all files being copied / Moved
Total File Size (GB) of data transferred so far of all the files
Total File Size (GB) of current file being copied / Moved
Total File Size (GB) of data transferred so far of the current file
current MB / sec transfer rate
Percent of each progress bar
Estimated time left based on current MB / sec transfer rate
Error if the file transfer fails ( example: someone unplugs the HDD before the transfer is finished. I do not want the function to hang filemaker indefinitely if the destination or source path is lost ). I would also like a value list of all the paths that were successfully transferred before it faile.
Error if the two file path value lists are not the same length
A successful transfer of all files will return a 1
If anyone would like to quote me a price to do this please reply or PM me. Thank you.
Posted 14 January 2011 - 01:53 AM
I am not able to do exactly what you want, but you may consider the following alternative/modification:
1. Copy, move and rename as options set and modifiable.
2. A default (but modifiable) source path and destination path.
3. Auto check and process (either copy, move or rename) whenever there is/are file(s) in source folder.
4. A log of files processed in FM and the respective file size.
1. Progress bar, it is artificial unless I can find way for FM to communicate with the OS seamlessly.
2. Time spend it possible by logging time start/end.
3. Cancellation involve reverse process.
4. Incomplete copying flags by different in File Size.
Note: Chances is a fm plug-in is required.
Email me at firstname.lastname@example.org if you are interested in engaging my service.
Speedy Scaleable Solutions