Beschreibung:
Holt die globalen Konfigurationsdateien ohne Projekt-ID.
Parameter:
|
Parametername |
Typ |
Beschreibung |
|
sSrcFilePath |
String |
Dateiname in der cmbt_Files Tabelle in der System-Datenbank |
|
sDestFilePath |
String |
Dateiname, unter dem die Datei abgespeichert werden soll. |
Rückgabewert:
Bool
|
Wert |
Beschreibung |
|
True |
Befehl wurde ausgeführt. |
|
False |
Befehl konnte nicht ausgeführt werden, dies deutet darauf hin, dass einer der Parameterwerte ungültig ist (Dateiname in cmbt_Files Tabelle kann nicht gefunden werden, Pfad für Speicherort ist ungültig, …). |
Beispiel VBScript:
' Die Konfigurationsdatei global.ini wird aus der Datenbanktabelle cmbt_Files in das Dateisystem geschrieben
Dim sSourceFileName : sSourceFileName = "global.ini"
Dim sDestinationPath : sDestinationPath = "C:\" & sSourceFileName
Dim bSuccess : bSuccess = cRM.FetchGlobalConfigFile(sSourceFileName, sDestinationPath)
If (bSuccess = True) Then
Call cRM.DialogMessageBox("Die Datei """ & sSourceFileName & """ konnte erfolgreich abgelegt werden: " & vbCrlf & "" & sDestinationPath & "", "cRM.FetchGlobalConfigFile", vbOkOnly)
ElseIf (bSuccess = False) Then
Call cRM.DialogMessageBox("Die Datei """ & sSourceFileName & """ konnte nicht erfolgreich abgelegt werden.", "cRM.FetchGlobalConfigFile", vbOkOnly)
End If
Beispiel C#-Script:
// Die Konfigurationsdatei global.ini wird aus der Datenbanktabelle cmbt_Files in das Dateisystem geschrieben
string sourceFileName = "global.ini";
string destinationPath = @"C:\" + sourceFileName;
bool success = cRM.FetchGlobalConfigFile(sourceFileName, destinationPath);
if (success == true)
cRM.DialogMessageBox("Die Datei \"" + sourceFileName + "\" konnte erfolgreich abgelegt werden: " + "\r\n" + "" + destinationPath + "", "cRM.FetchGlobalConfigFile", 0);
else if (success == false)
cRM.DialogMessageBox("Die Datei \"" + sourceFileName + "\" konnte nicht erfolgreich abgelegt werden.", "cRM.FetchGlobalConfigFile", 0);