xcopy

XCopy or MOVE do not work when a WCF Service runs a batch File. Why?

我的梦境 提交于 2019-12-07 00:54:12
问题 I have faced a case when the same batch file works differently from command line and when it is fired from a WCF service hosted on IIS. The difference is in XCOPY command. when I am running the batch file normally than XCOPY moves all data I need XCOPY "C:\from" "C:\to" /K /R /E /I /S /C /H /G /X /Y but when it runs from the WCF service nothing is copied. for running the batch from my service I am using the following code Executing Batch File in C# whith some little modifications. My

Batch script to make backup folder. only new and modified files

杀马特。学长 韩版系。学妹 提交于 2019-12-06 04:13:08
问题 I need a script to copy only the changed/modified and new files from my C:\Dropbox to my C:\backup. Why does this copy only the folder structure: @echo off set destination=C:\Backup set source=C:\Users\XXXX\Dropbox\Intranet for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set yyyymmdd1=%%j"."%%i"."%%k xcopy %source%"\*" %destination%"\*" /m/e/y mkdir %destination%"\LastBackupDate %yyyymmdd1%" echo A folder containing the latest date has been created in root directory of %source%. echo

XCopy or MOVE do not work when a WCF Service runs a batch File. Why?

廉价感情. 提交于 2019-12-05 04:13:00
I have faced a case when the same batch file works differently from command line and when it is fired from a WCF service hosted on IIS. The difference is in XCOPY command. when I am running the batch file normally than XCOPY moves all data I need XCOPY "C:\from" "C:\to" /K /R /E /I /S /C /H /G /X /Y but when it runs from the WCF service nothing is copied. for running the batch from my service I am using the following code Executing Batch File in C# whith some little modifications. My Application pull is running under LocalSystem account. I also tryed to use my own account for the application

What is an “XCopy version”?

佐手、 提交于 2019-12-05 03:44:18
I am trying to download Oracle Data Access Components. Some of the components are named as XCopy version . I know that XCopy is a command but what exactly does it mean in this context ? it appears to be referring to the same Xcopy command you are, and will do an Xcopy deployment , instead of using OUI. From the documentation ( this , for example): Administrators use XCopy to deploy Oracle Data Provider for .NET to large numbers of computers for production deployments. The XCopy has a smaller installation size and fine-grain control during installation and configuration than Oracle Universal

Running batch file with arguments from C#

孤街浪徒 提交于 2019-12-04 19:32:11
问题 I have a batch file like this @echo off xcopy /e %1 %2 I have my C# code as follows: string MyBatchFile = @"C:\Program Files (x86)\MybatchFile.bat"; string _sourcePath = @"C:\FolderToCopy"; string _tempTargetPath = @"C:\TargetFolder\"; var process = new Process { StartInfo = { Arguments = string.Format("{0} {1}", _sourcePath, _tempTargetPath) } }; process.StartInfo.FileName = MyBatchFile; bool b = process.Start(); I expect this to copy the source files to target location. But nothing happens.

batch to copy files with xcopy

瘦欲@ 提交于 2019-12-04 13:30:00
问题 I have checked some examples on internet but I can't get my (first) batch file to work. I would like to copy automatically my file from a folder to another one but nothing happen. @echo off xcopy "C:\source\" "C:\target\" /c /d /i /y exit Could you see anything wrong? Thanks!! Update: I have done the command given by Bali C but it still doesn't work. See snapshot xcopy C:\folder1 C:\folder2\folder1 /t /e /i /y xcopy C:\folder1 C:\folder2\ /t /e /i /y Image: I have to stop it with CTRL + C. PS

Exclude multiple file extension in xcopy

旧街凉风 提交于 2019-12-04 02:56:08
问题 I have few extensions which I want to exclude from xcopy. I don't know in which folder/directory those may exist. Below is the command I'm using: xcopy /r /d /i /s /y C:\test1 C:\test2 /exclude:.txt+.exe Anh help on this? 回答1: What you are looking for is this: xcopy /R /D /I /S /Y /EXCLUDE:exclude.txt "C:\test1" "C:\test2" Together with the following content of exclude.txt : .txt .exe However, the /EXCLUDE option of xcopy is very poor. It does not really exclude files with the given

xcopy is not recognized as an internal or external command, operable program or batch file

我的未来我决定 提交于 2019-12-03 22:06:32
I have a problem using 'xcopy' command. I'm building a C# project with msbuild. At the end of the build, a batch file is called to copy my assemblies from Debug/Release to some other folders. Here is the problem, my build fail and the error log is 'xcopy is not recognized as an internal or external command, operable program or batch file'. The path is correctly set, xcopy do works from a windows command line and from the visual studio command line (the one set with the project environment). I tried to set the path in the batch file but it doesn't help. Any suggestion? I'm using windows 7

Copy a file into USB flash drive root using batch files

假如想象 提交于 2019-12-03 21:24:53
I want to create a batch file to copy a file from any Dir into root folder that the .bat file located on that like a USB flash drive . My incomplete command : xcopy /s "%userprofile%\Desktop\test.txt" "?" What can I replace with "?" ??? Thanks guys This will do exactly as you want to any and all connected USB drives. @echo off for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,drivetype 2^>NUL`) do ( if %%l equ 2 ( xcopy /s "%userprofile%\Desktop\test.txt" %%i\ ) ) xcopy /s "%userprofile%\Desktop\test.txt" "\" You should replace it with drive letter of USB