CropAssetCopyTool
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user