migration documentation
This commit is contained in:
@@ -19,15 +19,17 @@ import com.univocity.parsers.csv.CsvParserSettings;
|
||||
public class ToolboxFileExporter {
|
||||
|
||||
private static Logger log = Logger.getLogger(ToolboxFileExporter.class);
|
||||
|
||||
private static String logfilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-25 - all photo gallery assets.download.log";
|
||||
|
||||
private static String toolboxExportFilePath = "C:\\Temp\\Migration CS - PhotoGallery\\export - 2017-08-25 - all photo gallery assets.csv";
|
||||
|
||||
private List<String[]> rows;
|
||||
private String baseDir = "D:\\ToolboxMigration_missing";
|
||||
private String baseDir = "D:\\ToolboxPhotoGallery";
|
||||
|
||||
// Formatdatei generiert mit
|
||||
// bcp "SELECT OriginalImage FROM AssetImages WHERE AssetID=586" queryout Image.jpg -S MOVNCG -d Bayertoolbox_prod -T
|
||||
// Geben Sie den Dateispeichertyp des Felds OriginalImage ein [varbinary(max)]: x
|
||||
// Geben Sie die Pr�fixl�nge des OriginalImage-Felds ein [8]: 0
|
||||
// Geben Sie die Präfixlänge des OriginalImage-Felds ein [8]: 0
|
||||
// Geben Sie das Feldabschlusszeichen ein [none]:
|
||||
|
||||
// Abruf:
|
||||
@@ -54,7 +56,7 @@ public class ToolboxFileExporter {
|
||||
}
|
||||
else {
|
||||
log.info("Download for asset " + assetId + ", OriginalFilename: '" + originalFilenname + "'");
|
||||
Process process = Runtime.getRuntime().exec(command1 + assetId + command2 + originalFilenname + command3, null, workingDir);
|
||||
Process process = Runtime.getRuntime().exec(command1 + assetId + command2 + assetId + command3, null, workingDir);
|
||||
process.waitFor();
|
||||
if (0 < process.exitValue()) {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
@@ -75,7 +77,7 @@ public class ToolboxFileExporter {
|
||||
|
||||
CsvParser parser = new CsvParser(settings);
|
||||
|
||||
rows = parser.parseAll(new File("C:\\Temp\\Migration CS - SQL Server\\missing_after_clean.csv"));
|
||||
rows = parser.parseAll(new File(toolboxExportFilePath));
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +85,7 @@ public class ToolboxFileExporter {
|
||||
try {
|
||||
Layout layout = new PatternLayout("%d{ISO8601} - %p %m%n"); // "%d{ISO8601} - %p %m%n"
|
||||
BasicConfigurator.configure(new ConsoleAppender(layout));
|
||||
BasicConfigurator.configure(new RollingFileAppender(layout, "C:\\Temp\\Migration CS - SQL Server\\missing_after_clean.log", false));
|
||||
BasicConfigurator.configure(new RollingFileAppender(layout, logfilePath, false));
|
||||
log.setLevel(Level.DEBUG);
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user