Split large files into smaller chunks - MonkeyBread Software
[Pages:1]Split large files into smaller chunks
If you need to ever split files with MBS FileMaker Plugin, you can do it using the BinaryFile functions like the following script shows. It opens a file for reading and copies 10 MByte chunks to new files.
Set Variable [ $InputPath ; Value: "/Users/cs/Desktop/tets.mp4" ] Set Variable [ $ChunkSize ; Value: 10*1024*1024 ] #
Set Variable [ $InputStream ; Value: MBS( "BinaryFile.Open"; $inputPath ) ] If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to open file." ; $InputStream & ? & $InputPath ] Exit Script [ Text Result: ] End If Set Variable [ $InputLength ; Value: MBS( "BinaryFile.Length"; $InputStream ) ] Set Variable [ $InputPosition ; Value: 0 ] Set Variable [ $Counter ; Value: 1 ] Loop # Read chunk
Set Variable [ $Chunk ; Value: MBS( "BinaryFile.ReadHex"; $InputStream; $ChunkSize ) ] #
# Write Chunk
Set Variable [ $OutputPath ; Value: $InputPath & "." & $Counter ] Set Variable [ $OutputStream ; Value: MBS( "BinaryFile.Create"; $OutputPath ) ] If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to create file." ; $InputStream & ? & $OutputPath ]
Set Variable [ $r ; Value: MBS( "BinaryFile.Close"; $InputStream ) ] Exit Script [ Text Result: ] End If Set Variable [ $r ; Value: MBS( "BinaryFile.WriteHex"; $OutputStream; $Chunk ) ] Set Variable [ $r ; Value: MBS( "BinaryFile.Close"; $OutputStream ) ] #
# next
Set Variable [ $InputPosition ; Value: $InputPosition + $ChunkSize ] Exit Loop If [ $InputPosition > $InputLength ] Set Variable [ $Counter ; Value: $Counter +1 ] End Loop #
# cleanup
Set Variable [ $r ; Value: MBS( "BinaryFile.Close"; $InputStream ) ]
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- textmix using nlp and apis to generate chunked sentence eric
- exploring data using python 3 dr charles r severance
- project 1 reliable transport university of california berkeley
- split large files into smaller chunks monkeybread software
- cs 4102 algorithms university of virginia school of engineering and
- use python with r with reticulate cheat sheet github
- list processing in sml wellesley college
- performance of compressed inverted list caching in search engines
- cs4102 l8 quickselectmedianofmedians john r hott
- parallel computing in python using mpi4py yale university
Related searches
- split mortgage payment into two
- python split string into char
- python split word into letters
- how to join pdf files into one
- combine jpg files into one pdf
- importing csv files into r
- powershell split into array
- powershell split string into lines
- how to import text files into python
- import csv files into excel
- how to combine pdf files into one
- import pdf files into word