header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Copy folder hierarchy
Last Post 28 Apr 2008 06:57 PM by themaxx. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
themaxxUser is Offline
New Member
New Member
Posts:3

--
28 Apr 2008 11:12 AM  

Hi,

i like to make a filecopy from a file in a subfolder, but i also like to copy/create the complete folder hierarchy above the subfolder @the new location of the file.

 

 

How can i do somthing like that in powershell?

thx

 

 

marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:178

--
28 Apr 2008 01:27 PM  
themaxxUser is Offline
New Member
New Member
Posts:3

--
28 Apr 2008 06:57 PM  

Hi, thx for the link, but i am looking for somthing ?different?

The example from you link:

c:\windows\
|--Test [folder]
|    |
     |--src [folder]
         |
         |-- A [folder]
         |    |
         |    |-- 1.txt [file]
         |
         |-- 2.txt [file]
|--Test2 [folder]
|    |
     |--src [folder]
         |
         |-- A [folder]
         |    |
         |    |-- 1.txt [file]
         |
         |-- 2.txt [file]

copy the src folder and all *.txt only files to f:\

f:\ windows\
|--Test [folder]
|    |
     |--src [folder]
         |
         |-- A [folder]
         |    |
         |    |-- 1.txt [file]
         |
         |-- 2.txt [file]
|--Test2 [folder]
|    |
     |--src [folder]
         |
         |-- A [folder]
         |    |
         |    |-- 1.txt [file]
         |
         |-- 2.txt [file]

All copy methods i tried end up like this:

f:\

     |--src [folder]
         |
         |-- A [folder]
         |    |
         |    |-- 1.txt [file]
         |    |-- 1.txt (2)[file]
         |
         |-- 2.txt [file]
         |-- 2.txt (2)[file]

No windows folder in f.\ no Test or test2 folder....just a flattend src folder....

 

You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer