PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
fSplit (Function)
In French: fDécoupe
Splits a file into several files. The created files can be merged into a single file by fMerge.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Example
// Splits the Video.avi file
fSplit("Video.avi", 100*1024*1024, "SplitVideo")
IF ErrorOccurred THEN
// Displays the error message
Error(ErrorInfo())
RETURN
END

// The "SplitVideo.001" and "SplitVideo.002" files have been created
// Delete the source file ("Video.avi")
fDelete("Video.avi")

// Uses the "SplitVideo.001" and "SplitVideo.002" files
// to re-create the "Video.avi" file
fMerge("SplitVideo", "Video.avi")
IF ErrorOccurred THEN
// Displays the error message
Error(ErrorInfo())
RETURN
END
Syntax
<Result> = fSplit(<File Name> , <Maximum Size> [, <Output File> [, <Option> [, <Progress Bar>]]])
<Result>: Integer
  • Number of created files,
  • 0 if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<File Name>: Character string (with quotes)
Full name of file to split.
<Maximum Size>: Integer
Maximum size (in bytes) of each created file. This size must be greater than 0.
<Output File>: Optional character string (with quotes)
Full path of files to create. The created files will correspond to the specified name followed by a ".xxx" extension where xxx corresponds to the subscript of the created file.
By default, <Output File> corresponds to <File Name>.
<Option>: Optional Integer constant
The source file is kept during the split operation. You have the ability to specify the following split option:
fDeleteSourceThe source file will be deleted as the split operation goes along.
Caution: If an error occurs, the source file will be LOST and it cannot be retrieved.
<Progress Bar>: Optional character string (with or without quotes)
Name of Progress Bar control, used to show the progress of split operation.
Remarks
  • fOpen cannot be used on a multi-part file. Before using fOpen, the source file must be re-created by fMerge.
    Note: fOpen used on a part allows you to access the sub-file corresponding to the part.
  • The function will return an error if an existing file and one of the sub-files to create have the same name.
  • The number of files that can be created cannot exceed 10 000.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment