Announcement

Collapse
No announcement yet.

Robocopy not working. Want to copy tree but create only file names

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Robocopy not working. Want to copy tree but create only file names

    Hi all,

    This is my first post. My name is Avraham and I am a technical writer + ex-programmer.

    So here is my first question.

    I would like to duplicate a directory tree, but instead of copying the files themselves, and I want to just create a placeholder for each file, where its filename is the original name. Or another way of looking at it is: I want to copy the file, but without the file data content, so I want a zero-length file.

    So I am using robocopy like this:

    robocopy Tree Tree_NoFnames /create

    however it is not working correctly. It is creating only an empty Tree_NoFnames directory.

    What I am doing wrong?

    TIA

    -avraham

  • #2
    Re: Robocopy not working. Want to copy tree but create only file names

    BTW, I am using Windows 7 Home Premium 32-bit SP1 on a ThinkPad SL510 laptop.

    - avraham



    Originally posted by amakeler View Post
    Hi all,

    This is my first post. My name is Avraham and I am a technical writer + ex-programmer.

    So here is my first question.

    I would like to duplicate a directory tree, but instead of copying the files themselves, and I want to just create a placeholder for each file, where its filename is the original name. Or another way of looking at it is: I want to copy the file, but without the file data content, so I want a zero-length file.

    So I am using robocopy like this:

    robocopy Tree Tree_NoFnames /create

    however it is not working correctly. It is creating only an empty Tree_NoFnames directory.

    What I am doing wrong?

    TIA

    -avraham

    Comment


    • #3
      Re: Robocopy not working. Want to copy tree but create only file names

      Try XCOPY with the /t and /e switches
      Tom Jones
      MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
      PhD, MSc, FIAP, MIITT
      IT Trainer / Consultant
      Ossian Ltd
      Scotland

      ** Remember to give credit where credit is due and leave reputation points where appropriate **

      Comment


      • #4
        Re: Robocopy not working. Want to copy tree but create only file names

        Originally posted by amakeler View Post
        So I am using robocopy like this:

        robocopy Tree Tree_NoFnames /create

        however it is not working correctly. It is creating only an empty Tree_NoFnames directory.
        Have you also tried
        Robocopy.exe /e /create "source" "destination"

        Do not interrupt a running robocopy job, when files in the source are large it may take longer to CREATE the destination.

        /Rems
        Last edited by Rems; 7th June 2011, 17:00.

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment


        • #5
          Re: Robocopy not working. Want to copy tree but create only file names

          Great - works fine!

          I've been 'out of it' for a bit. Sorry for the delay.

          Great thanks,

          avraham



          Originally posted by Rems View Post
          Have you also tried
          Robocopy.exe /e /create "source" "destination"

          Do not interrupt a running robocopy job, when files in the source are large it may take longer to CREATE the destination.

          Thanks

          /Rems
          Last edited by amakeler; 26th June 2011, 21:49.

          Comment

          Working...
          X