robocopy

I'm trying to use Robocopy to replace a cmd file

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 10:09:02
问题 I've created a cmd file which uses the Robocopy command to update some files on the PC, but I can't replace the cmd files, because this contains the Robocopy script which is doing the updating. How do you replace a file which is doing the replacing? I've moved the cmd file to another directory, which allows me to update most of the files, but I still can't replace the cmd file. The Flags I'm using in Robocopy are /MIR /Copy:DAT /DCOPY:T The Robocopy stopped at the cmd file and I can't replace

Robocopy Error 32 File I'm trying to update/replace is being used by another process

大城市里の小女人 提交于 2019-12-23 04:22:59
问题 I'm trying to copy a local file onto a server using robocopy. This is my script: if exist \\10.1.1.1\c$ net use \\10.1.1.1\c$ /delete net use Z: \\10.1.1.1\c$ p@ssword /user:domain\username :: first copy files to a temp directory xcopy C:\dev\Filepath C:\dev\TempFiles\ /E /C /H /R /K /O /Y :: then copy files from temp directory to server robocopy "C:\dev\TempFiles" "Z:\Program Files (x86)\Insite Software\Commerce Integration Service V3.7.1.16264" MSD*.dll net use \\10.1.1.1\c$ /delete I

How can i call robocopy within a python script to bulk copy multiple folders?

回眸只為那壹抹淺笑 提交于 2019-12-23 03:30:16
问题 I am trying to move multiple large folders (> 10 Gb , > 100 sub folders, > 2000 files ) between network drives. I have tried using shutil.copytree command in python which works fine except that it fails to copy a small percentage (< 1 % of files ) for different reasons. I believe robocopy is the best option for me as i can create a logfile documenting the transfer process. However as i need to copy > 1000 folders manual work is out of question. So my question is essentially how can i call

SMB protocol for copying files between remote shares

强颜欢笑 提交于 2019-12-23 01:44:10
问题 I need to copy a lot of data from remote share \s1 to share \s2. I'm using robocopy, which uses SMB protocol to copy files. My question -- does the protocol allow to copy data from S1 to S2 directly or all data has to go through the machine on which robocopy is running? 回答1: It uses the machine that it's running on. It copies the data from source in memory (on the current machine - current ) and from there to target . There's no other way (well there could be a client/server running on source

How to exclude subdirectories in the destination while using /mir /xd switch in robocopy

*爱你&永不变心* 提交于 2019-12-21 03:18:25
问题 There is a script running which mirrors a bunch of folders from one volume to another. The problem is that now there are going to be subdirectories within those folders at the destination which are not part of the original mirroring script. They are standalone subdirectories and I don't want them purged once the mirroring kicks in. Is there a way for me to use the /xd switch in robocopy wherein I'd be able to exclude the destination subdirectories. Example: robocopy "\\hq04t2fis202\archive\dr

Using robocopy with Visual Studio 2010 Post-build and Pre-build events

。_饼干妹妹 提交于 2019-12-20 11:03:11
问题 Robocopy outputs 1 upon success, unlike most programs that exit with 0 on success. Visual Studio (and MSBUILD) interprets exit code of 1 as an error. How can Robocopy be used in Visual Studio post- and pre-build events such that its failure and success are correctly identified by the build environment? Note: this is more or less a repost of this post. 回答1: MSBuild extensionpack contains a Robocopy task that you can use in your build process. Can this be a solution for you instead of VS pre

How to copy files from folder tree dropping all the folders with Robocopy?

心已入冬 提交于 2019-12-17 18:15:04
问题 I have the following folder structure: FolderA --Folder1 --Folder2 --Folder3 ... --Folder99 Folders 1 through 99 have files in them. All I want to do is to copy ALL THE FILES into ONE FOLDER, basically do a FolderA copy, and wipe out Folders 1-99 keeping all the files. I'd like to do it with Robocopy from cmd.exe if possible (Windows Server 2008) 回答1: Why use robocopy ? It's a good tool for a specific task but this is not the one. You can simply use what cmd already gives you: for /r %f in (*

robocopy adding /s automatically

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 16:07:00
问题 Hi I'm new to robocopy and need a little help. I know its really long but this is my batch file. robocopy "c:\users\olsen" "z:\trial" /z /e /fft /r:3 /w:2 /log+:z:\trial\log\backup.txt /xa:sh /tee /mt:32 /xjd /np /xd *cookies *"application data" *contacts *downloads *favorites *links *onedrive *"saved games" *searches *videos *appdata I'm trying to copy empty folders. Everything works great (almost) but it doesn't copy my empty folders. When i run my batch file and the command prompt screen

Robocopy: copy files preserving folder structure but adding a subfolder [closed]

自作多情 提交于 2019-12-13 15:54:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I need to copy a folder which contains subfolders with files to a shared folder on another machine. During that the script should create a custom sub folder in each destination folder and place files there. I hope this example clatifies the task: For the following source folder: --Logs ----Application -----

Command for Robocopy to log created date

霸气de小男生 提交于 2019-12-13 07:45:55
问题 I'm using Robocopy's log feature to get file information regardless of folder depth (from Learn-PowerShell). I was able to get a file's timestamp using /TS option of Robocopy, but this timestamp is modified date of the file. I also need to log the created date. So how can I log created date of file? And another one, how to log Modified date and Created date of folder too, using Robocopy? 回答1: if you can find a computer with PowerShell v5 you can install a module called PSAlphaFS . Install