From fbd663142f9ce58629909034dcbc3f5640c4fb06 Mon Sep 17 00:00:00 2001 From: gexce Date: Thu, 17 Aug 2017 16:30:12 +0200 Subject: [PATCH] CropAssetCopyTool --- .../src/com/bayer/edam/excelimport/CropAssetCopyTool.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Toolbox Migration/src/com/bayer/edam/excelimport/CropAssetCopyTool.java b/Toolbox Migration/src/com/bayer/edam/excelimport/CropAssetCopyTool.java index ae3389d..6ac9eda 100644 --- a/Toolbox Migration/src/com/bayer/edam/excelimport/CropAssetCopyTool.java +++ b/Toolbox Migration/src/com/bayer/edam/excelimport/CropAssetCopyTool.java @@ -39,7 +39,7 @@ public class CropAssetCopyTool { private static String assetPath = "D:\\Toolbox\\Assets"; private static String videoPath = "D:\\Toolbox\\Movies\\"; - private static File targetDir = new File("D:\\UploadAssets\\"); + private static File targetDir = new File("D:\\UploadAssets"); private static String videoTargetPath = "D:\\UploadVideos"; private static File videoTargetDir = new File(videoTargetPath); @@ -150,7 +150,7 @@ public class CropAssetCopyTool { } } else { - File targetFile = new File(targetDir + targetName); + File targetFile = new File(targetDir + "\\" + targetName); if (targetFile.exists()) { while (targetFile.exists()) { @@ -164,14 +164,14 @@ public class CropAssetCopyTool { newName = oldName.substring(0, oldName.length() - 3) + String.format("%03d", num) + "." + FilenameUtils.getExtension(oldName); } - targetFile = new File(targetDir + newName); + targetFile = new File(targetDir + "\\" + newName); } log.info("(AssetID " + assetId + ") Target file '" + targetName + "' already exists. Copy file as '" + targetFile.getName() + "'"); line[1] = targetFile.getName(); } - log.debug("(AssetID " + assetId + ") Copy " + file.getName() + " to " + targetFile.getAbsolutePath()); + log.debug("Copy " + file.getAbsolutePath() + " (AssetID " + assetId + ") to " + targetFile.getAbsolutePath()); if (!dryRun) FileUtils.copyFile(file, targetFile);