Sunday, November 3, 2019

linux - How to copy directory stucture, folders, sub-folders, files properties,metadata wihtout copying the actual content of files?





  • Softwares like DirLister, Snap2HTML


  • I have a external disk of size 2tb,, and laptop with 500gb SSD and free time at work..


  • Copy Volume Shadow of External Disk, just directory structure and files, files metadata only/not actual content of file.

  • Basically I want to copy just directory structure, folders, files properties/not the actual content of file; from external disk to my Laptop SSD

  • Copy them to my SSD and then take to work and re-arrange file, folder, change directory structure and then flash the changes i made to my external disk when Im home.

  • Important is to copy just directory structure, folders, files properties..
    Its Ok if It cant flash changes made to the directory onto disk.. I can do that manually

  • It would be like virtual disk (virtual disk without actual files)..

  • Are there any 3rd party software that can do it..
    Any software which copy list of file,folder,directory structure, and display them as if viewing in explorer



  • dir /b /s >extractlist.txt this cmd gives text file output with directory structure, file size & date.. And its pain in eye to go through those words.. So I was thinking if there is any software which fakes as windows explorer/any file explorer and shows shadow of external disk.Just cloning directory and file name and its properties.


  • Everything software has Export File List (.efu) I want something similar..Export directory structure, and file properties, just timestamp and what size the file was.



Answer



Robocopy:



Robocopy can easily exclude all files from a copy job, so that it only replicates the folder structure in the destination.



robocopy /e "d:\2TB external drive" "c:\SSD drive" /dcopy:dat /xf * /r:1 /w:1





  • /e includes all folders, including Empty folders.

  • /dcopy:dat includes Directory timestamps

  • /xf * Excludes all Files.

  • /r:1 Retries failed copies 1 time.

  • /w:1 Waits 1 second before retrying failed copies.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...