Jump to content

  •  

Photo

File move / copy function


  • Please log in to reply
1 reply to this topic

#1 Eden Morris  novice

Eden Morris
  • Members
  • 69 posts
  • FM Application:12 Advance
  • Platform:Windows 7
  • Skill Level:Expert
  • Certification:11
  • Membership:TechNet
  • Time Online: 3d 21h 8m 42s

Posted 30 November 2010 - 11:14 AM

Brief Description:

I need a file copy/move function (preferably in scriptmaster ) written that has a progress bar pop up with a cancel button.

Usage:

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.

Ideal Usage

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.

Details displayed

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
Elapsed time
Estimated time left based on current MB / sec transfer rate
cancel button

Return

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.
  • 0

#2 omegagoh  enthusiast

omegagoh
  • Members
  • 55 posts
  • LocationSingapore
  • FM Application:11 Advance
  • Platform:Cross Platform
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 43m 44s

Posted 14 January 2011 - 01:53 AM

Thanks for the detail description of the desired function. It combined the features of OS, FM Custom Function and Script.

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.

As for:
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 omegagoh@yahoo.co.uk if you are interested in engaging my service.

Regards,
Omega Goh
Speedy Scaleable Solutions
  • 0




FMForum Advertisers