Scenario
If you have your files copied across several HDDs many times you will find yourself in a situation where you want to check whether you have a specific file(s) and in which HDD. You may need to connect several HDDs and search, or worse you might have left one of the HDD at work and your at home
Solution
you find a good cataloging software or explore your own possibilities
Virtual Copy, the Bubble(VCB) by Cacrito V1.0
Why Bubble? it is visible, negiligible weight and it has almost no content, just air!
Code
Code: Select all
@echo off
setlocal enabledelayedexpansion
set SOURCE_DIR=D:\Newfolder
set DEST_DIR=D:\Newfolderblank
set FILENAMES_TO_COPY=*.*
for /R "%SOURCE_DIR%" %%F IN (%FILENAMES_TO_COPY%) do (
if exist "%%F" (
set FILE_DIR=%%~dpF
set FILE=%%~nxF
set FILE_INTERMEDIATE_DIR=!FILE_DIR:%SOURCE_DIR%=!
copy nul "%DEST_DIR%\!FILE!"
)
)
pause
It is intended to copy directory structure with files in it without file content. So you can keep a catalogue so all your files. I could not get the directory structure right so foxidrive helped me fix it.
Thank you foxidrive