robocopy

robocopy invalid parameter “-”

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to complete my batch script but under certain circumstances it fails. This is the command I am running: ROBOCOPY "C:\test\dash2\Hello - 4\" "C:\test\dash2\Hello - 4\..\" /MOV And this is the error I am getting ------------------------------------------------------------------------------- ROBOCOPY :: Robust File Copy for Windows ------------------------------------------------------------------------------- Started : Mon May 11 01:28:46 2015 Source - C:\test\dash2\Hello - 4" C:\test\dash2\Hello\ Dest - Files : Options : /COPY:DAT

How can I make robocopy silent in the command line except for progress?

流过昼夜 提交于 2019-12-02 14:34:39
I'm using robocopy to do backups with a PowerShell script, and it's pretty awesome, except that I'd like it to only show the progress percentage while it copies and not all of the other information. The other information clutters the command window, which I'd clean and simple so that it's easy to see the overall progress of the backup. Is this possible? Thanks, Andrew R. Koene I added the following 2 parameters: /np /nfl So together with the 5 parameters from AndyGeek's answer, which are /njh /njs /ndl /nc /ns you get the following and it's silent: ROBOCOPY [source] [target] /NFL /NDL /NJH

Robocopy as another user

北城以北 提交于 2019-12-02 06:31:07
问题 Problem: Robocopy not launching as another user in Start-Process The script works fine when running on an account that has the permissions for both file locations but it just doesnt seem to be accepting the -credential param. Unsure if my formatting is incorrect or if I am doing something wrong. # Create Password for credential $passw = convertto-securestring "Password" -asplaintext –force # Assembles password into a credential $creds = new-object -typename System.Management.Automation

RoboCopy - Files starting with a dash result in error

删除回忆录丶 提交于 2019-12-02 04:23:50
问题 We are in the process of migrating files from one share to another. We have built a tool in which the user can select directories and/or individual files to be copied to a destination share. The tool generates an individual RoboCopy command for each of the files or directories in the collection that results from the selection made by the user. We are having problems if an individual file to be copied starts with a dash, for instance: robocopy c:\temp c:\temp2 -a.txt RoboCopy bails out with:

How to skip existing and/or same size files when using robocopy

扶醉桌前 提交于 2019-12-02 03:24:07
问题 I have this code, thanks to this forum: @echo on set source="R:\Contracts\" set destination="R:\Contracts\Sites" ::Not sure if this is needed ::It guarantees you have a canonical path (standard form) for %%F in (%destination%) do set destination="%%~fF" for /r %source% %%F in (.) do if "%%~fF" neq %destination% ROBOCOPY "%%F" %destination% *.srt *.pdf *.mp4 *.jpg /COPYALL /R:0 Pause I am not sure if the code above has "SKIP commands" if file exists / or skip if file is the same size. It seems

Robocopy as another user

狂风中的少年 提交于 2019-12-02 00:17:17
Problem: Robocopy not launching as another user in Start-Process The script works fine when running on an account that has the permissions for both file locations but it just doesnt seem to be accepting the -credential param. Unsure if my formatting is incorrect or if I am doing something wrong. # Create Password for credential $passw = convertto-securestring "Password" -asplaintext –force # Assembles password into a credential $creds = new-object -typename System.Management.Automation.PSCredential -argumentlist "DOMAIN\Username", $passw # Select a source / destination path, can contain spaces

RoboCopy - Files starting with a dash result in error

假如想象 提交于 2019-12-01 23:33:39
We are in the process of migrating files from one share to another. We have built a tool in which the user can select directories and/or individual files to be copied to a destination share. The tool generates an individual RoboCopy command for each of the files or directories in the collection that results from the selection made by the user. We are having problems if an individual file to be copied starts with a dash, for instance: robocopy c:\temp c:\temp2 -a.txt RoboCopy bails out with: ERROR : Invalid Parameter #3 : "-a.txt" We tried the usual suspects (quotes around the filename etc.),

Using Robocopy to deploy sites

☆樱花仙子☆ 提交于 2019-12-01 21:39:34
问题 I want to be able to quickly deploy updates to a site that is fairly busy. For smaller sites I would just FTP the new files over the old ones. This one, however, has a few large dll's that regularly get updated and while they are copying the site is effectively down (plus there is the hassle of making backups of them in case something goes wrong. My plan is to use TortoiseHg to synchronise with a staging copy on the server over FTP (using netdrive or something similar). I can then check all

Using Robocopy to deploy sites

点点圈 提交于 2019-12-01 18:36:40
I want to be able to quickly deploy updates to a site that is fairly busy. For smaller sites I would just FTP the new files over the old ones. This one, however, has a few large dll's that regularly get updated and while they are copying the site is effectively down (plus there is the hassle of making backups of them in case something goes wrong. My plan is to use TortoiseHg to synchronise with a staging copy on the server over FTP (using netdrive or something similar). I can then check all is running smoothly and once that is complete I would like to run a .bat file (or something else) that

Powershell with Robocopy and Arguments Passing

[亡魂溺海] 提交于 2019-11-30 03:51:25
问题 I'm trying to write a script that uses robocopy . If I were just doing this manually, my command would be: robocopy c:\hold\test1 c:\hold\test2 test.txt /NJH /NJS BUT, when I do this from powershell, like: $source = "C:\hold\first test" $destination = "C:\hold\second test" $robocopyOptions = " /NJH /NJS " $fileList = "test.txt" robocopy $source $destination $fileLIst $robocopyOptions I get: ------------------------------------------------------------------------------- ROBOCOPY :: Robust File