Use Windows Explorer to copy a file/folder with its path structure

  • Thread starter Thread starter hmm
  • Start date Start date
H

hmm

Guest
Suppose I want to copy a file or folder from C:\ to D:\, but with the same
folder path structure. For example, if I copy C:\MyFolder\MyFile.doc to D:\,
it should save to D:\MyFolder\MyFile.doc, creating MyFolder in D: if
necessary. If I copy C:\MyFolder\Songs\ to D:\, it should copy all files in
Songs\ to D:\MyFolder\Songs\, creating folders as needed. Perhaps the xcopy
command do it, but I prefer to drag/drop using Explorer.

How would I do it?
 
Re: Use Windows Explorer to copy a file/folder with its path structure


"hmm" <hmm@discussions.microsoft.com> wrote in message
news:E7CB4549-9E15-4A8C-BDB2-4A3E352E3899@microsoft.com...
> Suppose I want to copy a file or folder from C:\ to D:\, but with the same
> folder path structure. For example, if I copy C:\MyFolder\MyFile.doc to
> D:\,
> it should save to D:\MyFolder\MyFile.doc, creating MyFolder in D: if
> necessary. If I copy C:\MyFolder\Songs\ to D:\, it should copy all files
> in
> Songs\ to D:\MyFolder\Songs\, creating folders as needed. Perhaps the
> xcopy
> command do it, but I prefer to drag/drop using Explorer.
>
> How would I do it?


Drag c:\MyFolder to D:\.
 
Re: Use Windows Explorer to copy a file/folder with its path structure

Thanks Pegasus.

The action you propose will copy ALL files in MyFolder to D:\MyFolder. The
question is if only want to move a SINGLE FILE to D:, while retaining the
source file's path on C:.

"Pegasus (MVP)" wrote:

>
> "hmm" <hmm@discussions.microsoft.com> wrote in message
> news:E7CB4549-9E15-4A8C-BDB2-4A3E352E3899@microsoft.com...
> > Suppose I want to copy a file or folder from C:\ to D:\, but with the same
> > folder path structure. For example, if I copy C:\MyFolder\MyFile.doc to
> > D:\,
> > it should save to D:\MyFolder\MyFile.doc, creating MyFolder in D: if
> > necessary. If I copy C:\MyFolder\Songs\ to D:\, it should copy all files
> > in
> > Songs\ to D:\MyFolder\Songs\, creating folders as needed. Perhaps the
> > xcopy
> > command do it, but I prefer to drag/drop using Explorer.
> >
> > How would I do it?

>
> Drag c:\MyFolder to D:\.
>
>
>
 
Re: Use Windows Explorer to copy a file/folder with its path structure

With Windows Explorer, you can't do as you propose. Xcopy with the /T /E
switches will.

hmm wrote:
> Thanks Pegasus.
>
> The action you propose will copy ALL files in MyFolder to D:\MyFolder. The
> question is if only want to move a SINGLE FILE to D:, while retaining the
> source file's path on C:.
>
> "Pegasus (MVP)" wrote:
>
>
>>"hmm" <hmm@discussions.microsoft.com> wrote in message
>>news:E7CB4549-9E15-4A8C-BDB2-4A3E352E3899@microsoft.com...
>>
>>>Suppose I want to copy a file or folder from C:\ to D:\, but with the same
>>>folder path structure. For example, if I copy C:\MyFolder\MyFile.doc to
>>>D:\,
>>>it should save to D:\MyFolder\MyFile.doc, creating MyFolder in D: if
>>>necessary. If I copy C:\MyFolder\Songs\ to D:\, it should copy all files
>>>in
>>>Songs\ to D:\MyFolder\Songs\, creating folders as needed. Perhaps the
>>>xcopy
>>>command do it, but I prefer to drag/drop using Explorer.
>>>
>>>How would I do it?

>>
>>Drag c:\MyFolder to D:\.
>>
>>
>>
 
Re: Use Windows Explorer to copy a file/folder with its path structure

The strength of Explorer is its simplicity of operation. Its weakness is the
lack of flexibility. You need a command such as the one below to copy
individual files:

xcopy /s /y /c "c:\MyFolder\My File\SomeFile.doc" "d:\MyFolder\MyFile\"

It will create the required folders and subfolders on the fly. Note the
switches and the trailing backslash.


"hmm" <hmm@discussions.microsoft.com> wrote in message
news:E3841290-3BB5-452E-95F1-DBDFAD51ADBE@microsoft.com...
> Thanks Pegasus.
>
> The action you propose will copy ALL files in MyFolder to D:\MyFolder.
> The
> question is if only want to move a SINGLE FILE to D:, while retaining the
> source file's path on C:.
>
> "Pegasus (MVP)" wrote:
>
>>
>> "hmm" <hmm@discussions.microsoft.com> wrote in message
>> news:E7CB4549-9E15-4A8C-BDB2-4A3E352E3899@microsoft.com...
>> > Suppose I want to copy a file or folder from C:\ to D:\, but with the
>> > same
>> > folder path structure. For example, if I copy C:\MyFolder\MyFile.doc
>> > to
>> > D:\,
>> > it should save to D:\MyFolder\MyFile.doc, creating MyFolder in D: if
>> > necessary. If I copy C:\MyFolder\Songs\ to D:\, it should copy all
>> > files
>> > in
>> > Songs\ to D:\MyFolder\Songs\, creating folders as needed. Perhaps the
>> > xcopy
>> > command do it, but I prefer to drag/drop using Explorer.
>> >
>> > How would I do it?

>>
>> Drag c:\MyFolder to D:\.
>>
>>
>>
 
Back
Top