robocopy

Passing a list to a subprocess call

扶醉桌前 提交于 2019-12-13 07:43:50
问题 I have a problem with trying to pass a list into a subprocess call command. I am trying to call the windows robocopy function, passing a list of file types that it should filter by. filter_list = ['*.txt', '*.dat'] call(["robocopy", src, dst, filter_list, "/e"]) So passing the list itself does not work the output from robocopy showed that it was trying to find the file type " .txt .dat" as if the whole list were a single file type. I then tried the following call(["robocopy", src, dst, ','

RoboCopy , Virtual Hard Disk, or other?

狂风中的少年 提交于 2019-12-13 03:44:28
问题 We an distributing 230K files, (873MB) of smallish JPG files on DVD. The install program will place these files in an Apache Virtual folder. Setup(.exe) is taking a too long for our customers. Our initial approach was to create a ZIP and copy from the DVD and unzip to the client Hard disk. I just tried a RoboCopy (we have a win7 (64 bit) 4 core computer. I tried with 16 threads. Pretty poor. Over Five Hours. Options : *.* /V /S /COPY:DAT /NP /MT:16 /R:5 /W:30 Copied Dirs : 6 Files : 230236

Why robocopy can't close when delete folder?

独自空忆成欢 提交于 2019-12-13 03:34:46
问题 I using robocopy to copy file from a Share folder "\\192.168.1.112\Share" to local folder "C:\test" This is my code: Dim strCMD="robocopy "\\192.168.1.112\Share" "C:\test" /MIR /NP /NDL /NFL /R:3 /W:1 /DCOPY:T" Dim oProcess As New Process() Dim oStartInfo As New ProcessStartInfo("cmd.exe", " /C" & strCMD) oStartInfo.UseShellExecute = False oStartInfo.RedirectStandardOutput = True oProcess.StartInfo = oStartInfo oProcess.Start() oProcess.WaitForExit() '++************************************* '

Robocopy (or xcopy) read from file?

旧城冷巷雨未停 提交于 2019-12-13 01:16:21
问题 so I have a few excel sheets that contain directories all stemming from a single root directory. Is there anyway to have robocopy (or similar program) read the excel sheet as input to only copy over the selected files? This is the format of the spreadsheets: NMMC c6 31b5ac6c-1377-4a86-90a0-73c6335907e3.IMG NMMC 2e 1da3d2ec-526f-479a-9c09-90cb2cfad0b6.IMG NMMC 8a f77168ad-2f35-490c-a2a8-25e9fa4ac0ea.IMG NMMC 2f fc2162f8-7548-4921-b722-5899cbe54641.IMG NMMC fc 1fe09fcd-3861-4de8-8bfd

How can I get unicode characters from robocopy process standard ouput in c#

夙愿已清 提交于 2019-12-12 17:19:35
问题 Our application runs various actions and displays the output in a log window. One action uses robocopy to copy files between folders. This works ok until the robocopy output contains unicode characters. I understand that I need to use the /unicode option but all I seem to get back is gibberish. Here's my simplified code sample: class Program { static void Main(string[] args) { StreamReader outputReader = null; StreamReader errorReader = null; using (Process process = new Process()) { Encoding

Create File with current Date in Filename + Robocopy logging

杀马特。学长 韩版系。学妹 提交于 2019-12-12 15:18:57
问题 Having very little experience with Batchfiles, scripting and generally "coding", I quickly ran into a problem with a Batch I want to create. The situation is as follows: I have a folder, in which *.txt files are automatically inserted, and I wanted to move these files to different folders based on the names the files have. I did this with Robocopy and it works just fine. Then I discovered the possibility to log the stuff that Robocopy does. The Batch currently looks like this: robocopy C:

Robocopy to copy files to a remote machine

若如初见. 提交于 2019-12-12 11:47:54
问题 I'm trying to write a robocopy command to copy files from my local computer to any one of my deployment servers ROBOCOPY ../../MyService/bin/release/ \\remote-computer\\C:\services\myservice /MIR and I get this error The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you. This is expected as I haven't included any sort of security credentials in the command. Is there a way to get this to work by including permissions

Robocopy in TFS Build PowerShell Step Reports Failure But Has No Error

寵の児 提交于 2019-12-12 11:02:03
问题 My powershell script runs without error reported in the log file, but the TFS 2015 build step reports an error. Do I need to perform a special call back? This is a new style build, not a XAML based one. The script is nothing special, it calls robocopy, which occurs successfully. Here's the script: [CmdletBinding()] param ( [string]$localWorkspace, [string]$destination ) begin{} process { try { ## Script $ServiceDirs = Get-ChildItem $localWorkspace -Recurse | ?{ $_.PSIsContainer -eq $True -and

How do I force Robocopy to overwrite files?

纵然是瞬间 提交于 2019-12-12 10:29:15
问题 In general, Robocopy ignores files for which lastwrittendate and filesize are the same. How can we escape this design? I'd like to force overwriting with Robocopy. I expected that dst\sample.txt should be written test001. But these file are recognized as the same files by Robocopy and not overwritten. The "/IS" option is not effective in this case. New-Item src -itemType Directory New-Item dst -itemType Directory New-Item src\sample.txt -itemType File -Value "test001" New-Item dst\sample.txt

Robocopy Invalid Parameter #7 Log

左心房为你撑大大i 提交于 2019-12-12 05:36:48
问题 I've been cracking my head trying to fix this. But it seems this command line isn't working for my robocopy batch file. It has something to do with the parameters, quotation marks, backslashes or maybe I'm just blind. I'm not too sure. Here's the code. REM @Echo Off SETLOCAL EnableDelayedExpansion Set hostname=%COMPUTERNAME% set torun=wmic bios get serialnumber /format:value for /f "tokens=2 delims==" %%a in ('%torun%') do set serial=%%a Set src="D:\BackUPTEST\%serial%" set dest="D: