Separated C1 working directory
This is a quite special method about creation of one master working folder for all C1 files, which is totally separated from image files. This is not suitable for most users and you have to take care, that you never use identical image file names. I was triggered to this "solution" from another C1 user in this forum, Please read his posting at: forum.phaseone.com/En/viewtopic.php?f=41&t=12164.
Here is my batch file to create required subfolder for CaptureOne (C1) in all the image directories.
For this you need first to create just one reference SymbolicLink to your separate C1 Folder:
In above example "p:\yyyy\yyyy-mm-dd..." is the image directory and "p:\CaptureOne" is the generated reference SymbolicLink to the working folder "o:\captureone-data\work-c1" of C1.
The following MSDOS Batch file "create-c1-symbolics.bat" has to be placed and started in the root of the image folder (p:\ in this example).
Before you start you have to consider important things:
Before start of the following batch file you have to modify the lines after [color=#FF0000:2ims00w0]REM *****[/color:2ims00w0]
Use the above batch file with care and at your own risk and please report errors.
I will modify the above code if required and update the version date.
Please note, that you can delete the all "\CaptureOne" SymbolicLinks without any risk, because the original working folder does still exist. However any subfolder or file in the SymbolicLink folders itself is mirrored and any modification is reflected through source and all other SymbolicLinks. In case you like to relocate your CaptureOne working directory (the master), you just have to delete all its SymbolicLinks. This is quite easy with command "[color=#008000:2ims00w0]rmdir /s CaptureOne[/color:2ims00w0]" and you do not need the dangerous "del /s ..." command. This RemoveDirectory command is very uncriticial because only empty directories can be removed (in this context SymbolicLinks are always "emtpy"). Afterwards create a new reference SymbolicLink pointing to the new master and repeat this batch. This goes quite fast even for large subfolder structures.
Regards from Joseph
Here is my batch file to create required subfolder for CaptureOne (C1) in all the image directories.
For this you need first to create just one reference SymbolicLink to your separate C1 Folder:
- Example: mklink /d p:\CaptureOne o:\captureone-data\work-c1
In above example "p:\yyyy\yyyy-mm-dd..." is the image directory and "p:\CaptureOne" is the generated reference SymbolicLink to the working folder "o:\captureone-data\work-c1" of C1.
The following MSDOS Batch file "create-c1-symbolics.bat" has to be placed and started in the root of the image folder (p:\ in this example).
Before you start you have to consider important things:
- If you like to edit any images with identical file names with C1 you shall not use the method and batch described in this posting.
- If you have already real C1 subfolders you first need to delete or to merge them in one working folder (another specific batch file?). You can check for any existing \CaptureOne\ subdirectories with two DOS commands in the root of you image folder:
REM first:then open the resulting list-c1dirs.txt to see the list of all CaptureOne subdirectories.
p:\> dir /ad /s /b > list-subdirs.txt
REM and second:
p:\> find "CaptureOne" < list-subdirs.txt > list-c1dirs.txt - Ensure, that while you edit images with C1, that the SymbolicLink in the image folder is existing and the working directory is alive (connected, mounted, switched-on).
- The size of SymbolidLink folders is Zero (0 kByte!). In any backup of your image directories the generated \CaptureOne\ folders are of course empty. So you can do a separate backup of the one and only C1 working folder, which is basically the main reason why I investigated this whole story.
- The batch file does NOT support image folder names with spaces. If there are any of such folders, see the report "list-created-symbolics.txt" after you start the batch for the 2nd time.
Before start of the following batch file you have to modify the lines after [color=#FF0000:2ims00w0]REM *****[/color:2ims00w0]
@echo off
set batname=%0 & title %batname% media@ey-com.de v2012-04-26 21:00 CEST
echo ===============================================================================
echo Batch file for generation of CaptureOne (C1) SYMBOLICLINKS in all subfolders
echo ===============================================================================
REM Create first a reference SymbolicLink to you CaptureOne (C1) working directory.
REM This can be done once with DOS command: mklink /d p:\CaptureOne o:\captureone-data\work-c1
REM (where the 1st directory is the symbolic link and the 2nd is the C1 working directory)
REM ***** Change p: in the next line to the drive letter where your images are located:
P:
REM ***** Define, where your CaptureOne reference SYMBOLICLINK is located:
set c1_symbolic=P:\CaptureOne
REM (This is NOT the CaptureOne working directory, where the SymbolicLink has to point to!)
REM The next line is automatically changing to the subfolder where this batch file is located:
cd %~dp0 & echo.
echo C1 SymbolicLink: = "%c1_symbolic%"
echo Processed Folder: = "%~dp0"
echo. & pause
if not exist %c1_symbolic% goto error
REM Delete previous SymbolicLink list.
echo Generated CaptureOne SymbolicLinks in all subfolders of %~dp0 > list-created-symbolics.txt
echo. >> list-created-symbolics.txt
REM Create list with all subfolders.
dir /ad /s /b > list-subdirs.txt
REM Remove all CaptureOne subfolders from this list.
find /v "CaptureOne" < list-subdirs.txt > list-imagedirs.txt
echo. & echo All directories where SymbolicLinks to CaptureOne will be placed: & echo.
for /F %%G IN (list-imagedirs.txt) do (echo %%G)
echo. & echo Start link generation in all folders of: "%~dp0" & echo. & pause & echo.
echo Copying process is skipped, when target link is already existing.
echo Please note, that with SymbolicLinks you always get "0 files copied",
echo because infact no real files are copied. & echo.
REM Make list of folders where SymbolicLinks will be be created.
for /F %%G IN (list-imagedirs.txt) do if not exist %%G\CaptureOne echo %%G >> list-created-symbolics.txt
REM Create SymbolicLinks. Parameter /b (binary copy) is very important.
for /F %%G IN (list-imagedirs.txt) do if not exist %%G\CaptureOne xcopy /b %c1_symbolic% %%G\CaptureOneecho. & echo For all new created SymbolicLinks see: "list-created-symbolics.txt"
goto end
:error
echo.
REM There was an error: CaptureOne reference SYMBOLICLINK folder does not exist!
:end
echo. & echo END of Batch File & echo. & pause
REM ===============================================================================
REM End of FileUse the above batch file with care and at your own risk and please report errors.
I will modify the above code if required and update the version date.
Please note, that you can delete the all "\CaptureOne" SymbolicLinks without any risk, because the original working folder does still exist. However any subfolder or file in the SymbolicLink folders itself is mirrored and any modification is reflected through source and all other SymbolicLinks. In case you like to relocate your CaptureOne working directory (the master), you just have to delete all its SymbolicLinks. This is quite easy with command "[color=#008000:2ims00w0]rmdir /s CaptureOne[/color:2ims00w0]" and you do not need the dangerous "del /s ..." command. This RemoveDirectory command is very uncriticial because only empty directories can be removed (in this context SymbolicLinks are always "emtpy"). Afterwards create a new reference SymbolicLink pointing to the new master and repeat this batch. This goes quite fast even for large subfolder structures.
Regards from Joseph
0
-
thanks for your effort, i will try to implement it instead of creating the directory and link manually 😊 0 -
Some DAM software is displaying junction folders even if no media files are located inside.
If you dislike the visibility of junction folders you may like to hide them all with:
attrib.exe +H CaptureOne /S /D /L
The drawback is, that you may no longer be aware, if such a C1 junction is missing in specific directories. In this case C1 will create a new local subfolder structure. If this happens you still can move the C1 files manually to the "remote" C1 working directory and create the junction afterwards.
I did not place this hiding command in the batch script, because this simple command can be inserted or started independently. You also need to know that before removing hidden directories, you have to unhide them.
Regards from Joseph
P.S.: Here is my trial to explain difference of symbolic and junction links (mklink with parameter /D or /J):- Create on PC-A a SYMBOLIC link c:\symbolic (which points to c:\target on PC-A).
Remote access from PC-B to PC-A on c:\symbolic would resolve to the c:\target on PC-B (error if not existing). - Create on PC-A a JUNCTION link c:\junction (which points to c:\target on PC-A).
Remote access from [color=#FF0000:344wty4g]PC-B to PC-A[/color:344wty4g] on c:\junction would resolve to the c:\target on [color=#0000FF:344wty4g]PC-A[/color:344wty4g].
May be the network case is unlikely to be useful, so SymbolicLink is ok for this C1 purpose.0 - Create on PC-A a SYMBOLIC link c:\symbolic (which points to c:\target on PC-A).
-
Thanks
This is something that I would love to be in C1 native. (Even if the "SSD metadata copies" are read only aka a cache like copy that is disposable)0
Post is closed for comments.
Comments
3 comments