xcopy

Copy a file into USB flash drive root using batch files

空扰寡人 提交于 2019-12-13 11:51:51
问题 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 回答1: 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

Qmake Command to copy directory and files

我的未来我决定 提交于 2019-12-13 03:09:10
问题 I want to copy the contents in directory "temp" to "dd" BINARY_DESTINATION_PATH = $$PWD$$SEPARATOR/dd/ RESOURCE_SOURCE_PATH = $$PWD$$SEPARATOR/temp EXPORTED_DESTINATION_PATH = $${BINARY_DESTINATION_PATH} EXPORTED_DESTINATION_PATH ~= s,/,\\,g EXPORTED_SOURCE_PATH = $${RESOURCE_SOURCE_PATH} EXPORTED_SOURCE_PATH ~= s,/,\\,g QT += core QT -= gui CONFIG += c++11 TARGET = sample CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp win32 { QMAKE_POST_LINK += $$quote(cmd /c xcopy

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

Copy Files with exact Structure into another Directory using XCopy

*爱你&永不变心* 提交于 2019-12-12 10:51:46
问题 Think I want to copy this file C:\Majid\File\text.txt to D:\Copied ( C:\Majid\File\text.txt ---> D:\Copied ) I want to use Xcopy to copy that file with its full directory into D:\Copied , then I should have something like this ---> D:\Copied\Majid\File\text.txt , as you see the drive letter is removed and all of other directory is created in destination directory. How can I do this action by XCopy? 回答1: see this: XCOPY COMMAND ... Syntax xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f

SolutionDir set to *Undefined* in post-build xcopy event

假装没事ソ 提交于 2019-12-12 08:26:26
问题 I have a project that has a post-build event that xcopies a DLLs to a certain directory: xcopy "$(TargetDir)$(TargetName).dll" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y xcopy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y However, I have CruiseControl.NET set up as a build server and MSBuild is failing on building that project due to this xcopy post-build event: MSB3073: The command "xcopy "C:\Build\Services\Windows\VehicleServer

Batch file that creates folder with wildcard in path

十年热恋 提交于 2019-12-12 06:19:02
问题 I want to write a batch file that creates a folder (if it does not exist) and copies a certain file into that folder. So far so good. The problem is that one folder in the path varies slightly from time to time, so a wildcard becomes necessary. The following code works just fine but obviously misses to create the folder (Reports). So if the folder is not there, it simply does nothing. for /r "c:\Users\%USERNAME%\AppData\Local\Packages" &&G in ("LocalState\acn\Reports") do @if exist %%G xcopy

New folder for every backup CMD

佐手、 提交于 2019-12-12 04:46:19
问题 I am trying to get a batch going to backup a folder on a work server. (Please see attached link) Bat Error "invalid number of parameters" Long story short - I need the script to name a new folder for each backup, which "md new_folder" was suggested, but I cannot seem to get the context or how to place it into the code. @echo This will now create a new backup of S:\Internal Auditor\9 - September 14 @echo off :: variables set SRCFOLDER="S:\Internal Auditor\9 - September 14" set DESTFOLDER="S:

Robocopy showing invalid parameter

こ雲淡風輕ζ 提交于 2019-12-12 01:48:50
问题 I am making a backup programme for my institute but robocopy copy showing Started : 11 April 2015 01:21:07 PM Source - F:\Training\HPES\CoreJava\ Dest - F:\11-04-2015\ Files : Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30 ------------------------------------------------------------------------------ ERROR : Invalid Parameter #3 : "\0121PM" Simple Usage :: ROBOCOPY source destination /MIR source :: Source Directory (drive:\path or \\server\share\path). destination :: Destination Dir (drive:

Build script to copy files from various source folder to various destination folder

浪子不回头ぞ 提交于 2019-12-11 22:13:53
问题 The basic requirement is to copy the various files and folders from different solution/project directories to the single build_output folder(/subfolders). Currently, I am doing this operation using the Robocopy commands. The only issue is my script is too long just using multiple Robocopy commands. <Copy SourceFiles="$(Docs)\Manual.pdf" DestinationFolder="$(BuildPath)\Help"/> <RoboCopy Source="$(Web1)" Destination="$(BuildPath)" Files="*.aspx" Options="/E"/> <RoboCopy Source="$(Web1)\Images"

why does my post-build xcopy always copy the previous version (or hang)?

感情迁移 提交于 2019-12-11 16:48:23
问题 I have a solution which creates DLLs and a post-build xcopy that copies them to a target folder where another solution consumes them. I have noticed that all seems to be well but in fact the xcopy always copies the previous version instead of the freshly built one. This is Case A . Even weirder (but possibly related): when I switched to a batch file to do the xcopy the build hangs. ( B ) And, finally, if I use a simple copy command in the batch file the build is successful, but again, the