DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: Recreate files but without content to target drive  (Read 75,196 times)

Biffle

  • Participant
  • Joined in 2012
  • *
  • Posts: 18
Re: Recreate files but without content to target drive
« Reply #50 on: August 24, 2016, 07:54 PM »
Thank you very much, vixay!
Windows 10 Home, 64bit

Biffle

  • Participant
  • Joined in 2012
  • *
  • Posts: 18
Re: Recreate files but without content to target drive
« Reply #51 on: August 24, 2016, 08:07 PM »
Looks complicated. Hmmm, where could I find this python script?

Just use RoboCopy (included with Windows):

robocopy <source> <dest> /CREATE /E /np /nfl /ndl /njh /njs

It'll do it in a few seconds.

Yes, indeed, that's great, many thanks!

But it obviously doesn't work with paths containing a space or "ü", "ä", etc.
For example it does not work with:
robocopy C:\den Lw C\Vorübergehend\FileBot C:\den Lw C\Vorübergehend\test /CREATE /E /np /nfl /ndl /njh /njs

Is there a way to make it work with those characters, spaces?

Thank you very much again.
Windows 10 Home, 64bit

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: Recreate files but without content to target drive
« Reply #52 on: August 24, 2016, 09:30 PM »
As always, you need to enclose paths with spaces in quotes, eg. "C:\this is a path"

robocopy "C:\den Lw C\Vorübergehend\FileBot" "C:\den Lw C\Vorübergehend\test" /CREATE /E /np /nfl /ndl /njh /njs
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

Biffle

  • Participant
  • Joined in 2012
  • *
  • Posts: 18
Re: Recreate files but without content to target drive
« Reply #53 on: August 24, 2016, 09:43 PM »
Ah yes, now it is working.

Thank you very much!
Windows 10 Home, 64bit

Original address: https://www.donationcoder.com/forum/index.php?topic=18682.0