robocopy powershell just get a list of folder and file names -


i trying use robocopy in powershell first list of folders in fileshare , secondly list of files in particular folder only. when use robocopy \\grape\documents\testacasmigration2 null /l /s /njh /bytes /fp /nc /xj /r:0 /w:0 outputs this

     0  \\grape\documents\testacasmigration2\            0    \\grape\documents\testacasmigration2\test\            0    \\grape\documents\testacasmigration2\test\migration\  ------------------------------------------------------------------------------                 total    copied   skipped  mismatch    failed    extras     dirs :         3         3         0         0         0         0    files :         0         0         0         0         0         0    bytes :         0         0         0         0         0         0    times :   0:00:00   0:00:00                       0:00:00   0:00:00    ended : 05 august 2015 10:25:11 

is there anyway can in 2 arrays, 1 folders , 1 files in particular folder not wanting get_children or doesn't work paths above 260. robocopy why have asked question robocopy

is you're after:

$folder=[io.directory]::getdirectories("c:\temp") $files=[io.directory]::getfiles("c:\temp")  

that gives me following output:

enter image description here


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -