It is easy enough to use command line to deal with them but I wrote a little script that will join them for you (still using command line). Also the script will try to guess the file name.
Posting this as more examples of how to do things in dialogs.
Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Let>RP_ADMIN=1
Let>APP_TITLE=Phil P File Joiner
Let>MSG_STAYONTOP=1
Let>MSG_CENTERED=1
Let>MSG_WIDTH=400
Let>MSG_HEIGHT=210
Let>WF_TYPE=1
Let>VAREXPLICIT=0
Let>CF_OVERWRITE=1
Dialog>Dialog1
object Dialog1: TForm
Left = 782
Top = 345
HelpContext = 5000
BorderIcons = []
BorderStyle = bsSingle
Caption = 'File Joiner'
ClientHeight = 192
ClientWidth = 307
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 16
Width = 238
Height = 13
Caption = 'Select the folder that contains the files to be joined'
end
object Label2: TLabel
Left = 8
Top = 72
Width = 67
Height = 13
Caption = 'New Filename'
end
object Edit1: TEdit
Left = 8
Top = 40
Width = 209
Height = 21
TabOrder = 0
end
object MSButton1: tMSButton
Left = 226
Top = 38
Width = 75
Height = 25
Hint = 'Select folder to work in'
Caption = 'Browse'
TabOrder = 1
DoBrowse = False
BrowseStyle = fbFolder
end
object MSButton2: tMSButton
Left = 5
Top = 154
Width = 140
Height = 25
Hint = 'Exit and Quit'
Caption = 'Exit'
TabOrder = 5
DoBrowse = False
BrowseStyle = fbOpen
end
object MSButton3: tMSButton
Left = 160
Top = 154
Width = 140
Height = 25
Hint = 'Join the files'
Caption = 'Join!'
TabOrder = 6
DoBrowse = False
BrowseStyle = fbOpen
end
object Edit2: TEdit
Left = 8
Top = 92
Width = 209
Height = 21
TabOrder = 2
Text = 'Filename.txt'
end
object MSButton4: tMSButton
Left = 226
Top = 90
Width = 75
Height = 25
Hint = 'Attempt to guess the filename and extension'
Caption = 'Guess FN?'
TabOrder = 3
DoBrowse = False
BrowseStyle = fbOpen
end
object CheckBox1: TCheckBox
Left = 8
Top = 123
Width = 297
Height = 17
Caption = 'Delete Originals - *Deletes all files except New Filename!*'
TabOrder = 4
end
end
EndDialog>Dialog1
Let>INITDIR=C:\temp
SetDialogProperty>Dialog1,MSButton1,InitialDir,%INITDIR%
SetDialogProperty>Dialog1,Edit1,Text,%INITDIR%
Let>Selected_Folder=%INITDIR%
AddDialogHandler>Dialog1,MSButton1,OnClick,DoBrowse
AddDialogHandler>Dialog1,MSButton2,OnClick,Quit
AddDialogHandler>Dialog1,MSButton4,OnClick,Guess
AddDialogHandler>Dialog1,MSButton3,OnClick,Go
AddDialogHandler>Dialog1,CheckBox1,OnClick,SureQ
Show>Dialog1,res
SRT>DoBrowse
SetDialogProperty>Dialog1,MSButton1,DoBrowse,True
GetDialogProperty>Dialog1,MSButton1,Filename,Selected_Folder
SetDialogProperty>Dialog1,Edit1,Text,Selected_Folder
END>DoBrowse
SRT>Guess
Let>GFL_TYPE=0
GetFileList>%Selected_Folder%\*.001,strFileList,;
//
IF>%strFileList%=
MDL>Cannot find any files
Goto>noguess
ENDIF
StringReplace>%strFileList%,%Selected_Folder%\,,OneFileName
Separate>OneFileName,.,OneParts
Let>ExtensionNum=OneParts_Count-1
Let>Extension=OneParts_%ExtensionNum%
Let>OriginalName=OneParts_1
Let>New_Filename=%OriginalName%.%Extension%
SetDialogProperty>Dialog1,Edit2,Text,%New_Filename%
Label>noguess
END>Guess
SRT>Go
GetFileList>%Selected_Folder%\*.001,strFileListX,;
IF>%strFileListX%=
MDL>There appears to be no files in that folder
Goto>noguessx
ENDIF
GetDialogProperty>Dialog1,Edit2,Text,New_Filename
GetDialogProperty>Dialog1,CheckBox1,Checked,destroy
Run>cmd.exe /c copy/b "%Selected_Folder%"\*.* "%Selected_Folder%"\"%New_Filename%"
//
IF>%destroy%=True
MoveFile>%Selected_Folder%\%New_Filename%,c:\temp\%New_Filename%
DeleteFile>%Selected_Folder%\*.*
MoveFile>c:\temp\%New_Filename%,%Selected_Folder%\%New_Filename%
ENDIF
//
MDL>FINISHED :-)
//
Label>noguessx
//
END>Go
SRT>SureQ
GetDialogProperty>Dialog1,CheckBox1,Checked,ToF
IF>%ToF%=True
MDL>Please be aware that if this checkbox remains checked:%CRLF%%CRLF%ALL FILES in the selected folder will be DELETED%CRLF%%CRLF%Except the New Filename
ENDIF
END>SureQ
SRT>Quit
CloseDialog>Dialog1
End
Exit>0
END>Quit