Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
221 views

Here is my situation. I have an XML that resides in a path that contains 260+ characters. One of the folders in this path will always be random, another one is based on versions so it could be ...
HikerJim's user avatar
1 vote
1 answer
815 views

I am trying to use Powershell's Copy-Item commandlet with the -Recurse and -Force parameters to copy settings from one registry key and overwrite the same settings (if they exist) in another key. If ...
Graham Powell's user avatar
0 votes
1 answer
3k views

I am very much a newbie to powershell but have figured out some of what I need for a project at work. We have test result files (PDF, XLS. TXT, etc) in folders relating to test locations. Most ...
user3614286's user avatar
0 votes
1 answer
8k views

I'm trying to write a powershell scripts to search a folder and its subfolders for a specific folder from a csv file and then copy that folder elsewhere. [CmdletBinding()] Param( [Parameter(...
Shawn's user avatar
  • 2,366
1 vote
1 answer
461 views

I'm trying to write a file and delete a file on multiple remote Windows machines. If the machine is not available, ie. not on line I want to capture that in an error log so that I have a list of ...
user3591360's user avatar
15 votes
5 answers
48k views

Why does gci $from -Recurse | copy-item -Destination $to -Recurse -Force -Container not behave in the same way as copy-item $from $to -Recurse -Force ? I think it should be the same, but somehow ...
Dejan Dakić's user avatar
  • 2,448
19 votes
1 answer
28k views

Does the -Filter or -Include parameter work for anyone when using Powershell 3.0? I've tried both of the following commands: Copy-Item -Path c:\temp -Include "*.TXT" -Destination C:\temp2 and Copy-...
inquisitive_one's user avatar
1 vote
3 answers
203 views

Hi all: This is what I'm trying to do.... Take a result set (eg. listoffailedcomputers.txt) and run a copy command on every item inside the result set. The logic is to run a copy command on all the ...
megaphobema-mesomelas's user avatar
4 votes
1 answer
2k views

I am using a FileSystemWatcher to notify on file change, and then create a copy of that file: $watcher = New-Object System.IO.FileSystemWatcher $watcher.Path = "C:\Orders\" $watcher....
Mark Richman's user avatar
  • 29.8k
3 votes
1 answer
1k views

I'm still a bit of a newbie at powershell (coming from vbscript) and it has been a while since I have done anything too serious, so I apologise in advance if the code isn't as graceful as it could be. ...
Pazu's user avatar
  • 31
1 vote
1 answer
13k views

This one has me stumped. I have already searched on "copy-item cannot bind argument to parameter 'path' because it is null", and found several posts where the answer involved fixing the syntax so that ...
dave_mystic's user avatar
2 votes
1 answer
4k views

I must copy a file names as follow $filename = "Sport.EL#15.csv.[]" into another folder. if I use copy-item -force Sport.EL#15.csv.[] $dest_path it doesn't work. since I do that: foreach ...
rschirin's user avatar
  • 2,049
2 votes
2 answers
9k views

My script keeps bugging me with the following exception copy-item : Cannot find drive. A drive with the name 'F' does not exist. At C:\Program Files (x86)\CA\ARCserve Backup\Templates\RB_Pre_Process....
Matthias Güntert's user avatar
4 votes
5 answers
13k views

I'm trying to use Copy-Item to copy a file to an existing folder and getting the error "Could not find part of path". I've Googled this problem for ages, but can't seem to find an answer. I altered ...
Matty W's user avatar
  • 65
0 votes
2 answers
928 views

I can't believe this is as difficult as I'm finding it. I have a folder on a server share. This folder has a number of subfolder which may, or may not, contain a file I want to overwrite with a ...
ninety's user avatar
  • 19
2 votes
2 answers
4k views

Basically from a input provided network path (e.g "\SERVER\SHARE\") i want to copy a specific Excel file to my desktop and run it automatically. Problem is that on my desktop there are other Excel ...
Crit Scratch's user avatar
0 votes
1 answer
809 views

I've got a folder with a lots of installation files inside. I would like to take some of these (found by given pattern) and mirror them to the flash drive. Source: D:\ccleaner124.exe D:\dfc221.exe ...
Joudicek Jouda's user avatar
4 votes
2 answers
13k views

I'm using powershell to copy file to a remote computer witht he following command : Copy-Item -Path [MyPath]\* -Destination \\[server]\[MyPath] -force It's working great, but sometime I'm receiving ...
Marc-André Bilodeau-Lamontagne's user avatar
21 votes
3 answers
58k views

I am trying to use Copy-Item from remote machine to another remote machine with the command: Copy-Item -Path "\\machine1\abc\123\log 1.zip" -Destination "\\machine2\\c$\Logs\" I am constantly getting ...
Geeth's user avatar
  • 321
1 vote
1 answer
5k views

I'm writing a script that will open files in a directory and perform a find/replace. But before I do that I would like to make copies of the files in the same directory as the original file. All ...
spickles's user avatar
  • 645
38 votes
4 answers
45k views

I am using the PowerShell Copy-Item command to copy a directory with files to another location. I want to display all the files on the console that are getting copied so that I know the status of the ...
tusharmath's user avatar
2 votes
1 answer
1k views

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. if ([[UIDevice ...
Tooth Less's user avatar
8 votes
3 answers
28k views

I am copying files from One Windows machine to another using Copy-Item in Powershell script. But I want to wait till copy completes, Powershell Copy-Item is non-blocking call means, it just triggers ...
VarunVyas's user avatar
  • 1,465
2 votes
1 answer
2k views

#VARIABLES $Source = Read-host "Please provide DIR location you wish to copy its contents from. ie. (UNC, Absolute paths, etc)" $Serverlist = Read-Host "Please provide the location of the server ...
user1592499's user avatar
3 votes
1 answer
3k views

I am counting all files in my Pictures folder with Get-ChildItem C:\pictures -force | Group-Object extension | Sort-Object count -descending | ft count,name -auto I am then copying all my MTS-files (...
Sune's user avatar
  • 3,320
2 votes
1 answer
2k views

I know how to do it with different commands but is there a way to make it so copy-item cmdlet also copies directories to the target folder for example if I wanted to copy everything in the C:\users ...
user1553612's user avatar
0 votes
1 answer
14k views

This is what I have but keep getting following error. I am using Windows 7 Home Premium 64bit. I need to copy everything from my laptop hard-drive to desktop K:\Mybackup folder. $source = "M:\" $dest ...
torres's user avatar
  • 1,383
1 vote
1 answer
908 views

I have a homework problem and I can't get to the end of it: Write a shell that has two folder names as parameters and moves the second folder as subfolder of the first one and adds '.unu' to all ...
Roxana Gr.'s user avatar
4 votes
2 answers
11k views

I tried to use powershell command copy-item as xcopyto copy content of one disk to another one. copy-item -Path h:\* -Destination g:\ -Recurse -Force However, I encountered the following errors: ...
Loom's user avatar
  • 10k
0 votes
1 answer
2k views

I have the command Copy-Item -literalPath $file.ServerItem $destinationPath -recurse -force where $file.ServerItem (path to file on tfs server that we want to copy)= "$/TFSServer/MyPath/...
Akin's user avatar
  • 149
1 vote
1 answer
2k views

I'm writing a powershell script for deployment. I need to copy changed files from TFS to our Test Server. I have been able to retrieve the change sets, and I have been able to drill down to the Item. ...
Akin's user avatar
  • 149
35 votes
3 answers
44k views

When I run a recursive Copy-Item from a folder that has sub folders to a new folder that contains the same sub folders as the original, it throws an error when the subfolders already exist. How can I ...
user1161625's user avatar
1 vote
1 answer
1k views

Im writeing a backupscript useing powershell. I know that i could just use robocopy or rsync but i would like to do this in powershell. The problem i have has to do with the copy-item cmdlet. What my ...
UdK.cH's user avatar
  • 1,055
4 votes
1 answer
16k views

I have a program that copies folders and files recursively. example: Copy-Item -path "$folderA" -destination "$folderB" -recurse Sometimes the files do not copy. Is there a way to "step inside the ...
alphadev's user avatar
  • 1,679
8 votes
2 answers
4k views

Howdy, am trying to copy a file from IE cache to somewhere else. This works on w7, but not Vista Ultimate. In short: copy-item $f -Destination "$targetDir" -force (I also tried $f.fullname) The ...
boink's user avatar
  • 81
101 votes
13 answers
197k views

Is there any way to copy a really large file (from one server to another) in PowerShell AND display its progress? There are solutions out there to use Write-Progress in conjunction with looping to ...
Jason Jarrett's user avatar
0 votes
1 answer
3k views

I am executing a query in SQL Server and returning a single column result set. I need to loop through the result set and find file names matching the record from the result set. Part of the file name ...
stittdba's user avatar
2 votes
1 answer
4k views

Given the dir structure: x\Code x\Script\Backup.ps1 Backup.ps1 contains: $BackupDirectoy = "..\Backup" $CodeDirectory = "..\Code" function BackupCurrentVersion() { New-Item $...
Victor Hurdugaci's user avatar
6 votes
2 answers
26k views

I'm trying to get PowerShell to copy files from a remote computer (on which I have admin rights through AD) to the local computer. It fails in the strangest place. Here's a snippet of the script: ...
AndreasKnudsen's user avatar
6 votes
4 answers
15k views

I have two machines Server A and Server B, and I want to copy all the files and folder tree from Server A to Server B using PowerShell. I have tried the command given below, but it copies only the ...
Selwyn's user avatar
  • 1,621
33 votes
5 answers
75k views

I am trying to recurse through a directory and copy it from A to B. That can be done with the following: Copy-Item C:\MyTest C:\MyTest2 –recurse I want to be able though to only copy new files (ones ...
user avatar
47 votes
2 answers
32k views

I am writing a script for MS PowerShell. This script uses the Copy-Item command. One of the optional arguments to this command is "-container". The documentation for the argument states that ...
Mark Meuer's user avatar
  • 7,613

1 2 3 4 5
6