PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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 Java applications.
Android This function is now available for 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 Java applications.
Android This function is now available for 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 Java applications.
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Example
// Découpe le fichier Video.avi
fSplit("Video.avi", 100*1024*1024, "VideoDécoupée")
IF ErrorOccurred THEN
// Affiche le message d'erreur
Error(ErrorInfo())
RETURN
END
 
// Des fichiers "VideoDécoupée.001", "VideoDécoupée.002" ont été créés
// Suppression du fichier source "Video.avi"
fDelete("Video.avi")
 
// Utilise les fichiers "VideoDécoupée.001", "VideoDécoupée.002"
// pour recréer le fichier "Video.avi"
fMerge("VideoDécoupée", "Video.avi")
IF ErrorOccurred THEN
// Affiche le message d'erreur
Error(ErrorInfo())
RETURN
END
Syntax
<Result> = fSplit(<File name> , <Maximum size> [, <Output file> [, <Option> [, <Progress Bar control>]]])
<Result>: Integer
  • Number of created files,
  • 0 if an error occurs. To get the details of the error, use ErrorInfo with the errMessage constant.
<File name>: Character string
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
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 control>: Optional control name
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 the fOpen function, the original file must be recreated with the fMerge function.
    Remark: The fOpen function used on a part only allows access to the subfile 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.
Component: wd270std.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment