Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
-3 votes
1 answer
72 views

Xcopy for other os [closed]

I am loocking for an equivalent of windows's xcopy /s /q /e /h /i folder0 folder1 for other os(mainley the most common like linux and unix). This is for exportability on a (python) script I am writing....
rnd_name's user avatar
0 votes
1 answer
47 views

XCOPY not working when run from Userdata in Windows ec2

This is a bizzare issue. For whatever reason xcopy is not working under these conditions: Windows Server 2022, EC2Launch v2 Run from Userdata When I log in and run it manually it works just fine. ...
Ranald Fong's user avatar
0 votes
2 answers
104 views

save xcopy error message in a variable in powershell

I want to assign to a variable the error message printed by an xcopy command from a powershell script. If I simply assign the command to a variable, it only saves the last line, where it says the ...
likeeatingpizza's user avatar
1 vote
0 answers
48 views

Not Sure How to Proceed

I am running a NVR on my pc and I create a folder everyday with the date as the folder name like so...(013124) C:/user/profile/videos/013124. At 1202AM I Copy this folder to a network share for backup....
Keith Howard's user avatar
-1 votes
1 answer
208 views

Default sort order of xcopy

I'm referring to a batch script to create a list of files having file timestamp greater than specified date and store the list of pathnames in a text file. I want to use this to feed a process that ...
Siyahi's user avatar
  • 1
0 votes
1 answer
597 views

Can't copy folder with permissions to NAS share

I wrote a powershell script that changes the ACL of a network folder. We used to run this script on local drives and on a network share just fine. Recently, we migrated to Windows Server 2019 and ...
Eleandro's user avatar
0 votes
1 answer
88 views

Invalid number of parameters xcopy

I am creating a pipeline script in my jenkins server(windows). I am trying to copy from SOURCE to DESTINATION using following command. I am getting an error 'invalid number of parameters xcopy /O /X /...
user1015388's user avatar
  • 1,543
0 votes
1 answer
70 views

XCopy specific txt files in multiple subfolders without subfolder in path

I have a batch file to copy over files from Web folder to my local folder. Web folder destination look like this: G:\program files\2023\subfolder_1\1.txt G:\program files\2023\subfolder_1\1_total.txt ...
mashimena's user avatar
  • 175
0 votes
1 answer
242 views

How to batch copy a list of folders and its file contents from a text file into a new folder in windows

I have a folder with approximately 7000 subfolders. I am interested in copying 1500 of those subfolders and their file contents into a new folder. The closest I have got is copying the subfolders file ...
MagicGnome's user avatar
2 votes
1 answer
203 views

why does the list switch allow xcopy to work?

I have a batch script that uses xcopy to copy a large number of files. For a while, the following setup worked fine: set source=<path_to_source_files> set dest=<path_to_destination> xcopy ...
mathlete's user avatar
1 vote
1 answer
64 views

Batch File Unable To Compare Two String Variables

The company I work at utilizes a batch file to backup user profiles. The script originally used robocopy, but now also uses xcopy in some cases. We run this script manually when re-imaging users to ...
MKEmike43ver's user avatar
0 votes
1 answer
547 views

using for loop to copy selected files in directory and subdirectories to new directory with the same structure

for /r "C:\Users\bui\Desktop\Annotation Traing Package\test1" %i in (*03.json) do copy "%i" "C:\Users\bui\Desktop\Annotation Traing Package\test2" i want to copy all 03....
toan bui's user avatar
0 votes
1 answer
66 views

How do I write a batch programe to copy a set of folders with same suffix and their files from a server to a client?

I want to write a batch program to copy some deeply nested folders with the same suffix in this case 100, It only copied all the folders but only one file in the top most folder (they are ...
UIsa's user avatar
  • 11
0 votes
1 answer
511 views

Batch File to copy files to new directory while renaming, skipping existing files, and without confirmation

I am creating a batch file to be run later which will be used to copy files from one location to another while renaming the files, skipping any existing files, and without prompting the user. Examples ...
agrarian's user avatar
0 votes
1 answer
427 views

Copy a file in Post Build of Eclipse/Truestudio

I was using arm-objcopy but it doesn't work with my .h file I need to copy to another project. xcopy "../${project_loc}/src/folder/file.h" "....\OtherProject\folder\folder2\file.h" ...
ConductedForce's user avatar
1 vote
1 answer
784 views

msbuild building projects in solution multiple times

I'm trying to automate a build, and I'm running into a problem building a single solution. In this solution, project 1 references project 2, which references project 3. Project 4 also references ...
Patrick's user avatar
  • 31
0 votes
1 answer
2k views

Copying a file to jenkins workspace location

I need to copy one file to the workspace location of jenkins for my pipeline jenkins job. For that I need to use bat command for windows. What is the bat command to copy the file from one source ...
G.A's user avatar
  • 11
0 votes
1 answer
2k views

XCopy won't copy from path of the batch script

I have an intune package which runs a batch script as follows. SET INST=%~dp0 xcopy %INST%\Folder1\* "C:\Program Files (x86)\Test\Folder2" /s /i Goal is to copy files from Folder1 to ...
Nebelz Cheez's user avatar
5 votes
2 answers
29k views

XCOPY- How to copy Source Folder and all subfolder/files but INCLUDE THE SOURCE FOLDER [closed]

All Xcopy/robocopy documentation seems to gloss over copying the folder as if you are performing a right-click copy and paste. I want C:\Folder to copy to D:\Whatever but I want it to look like D:\...
Clint Siebert's user avatar
1 vote
1 answer
282 views

Scheduled BAT - Error during XCOPY if file is in use

I have this script scheduled every hour: @echo off set path1="E:\Document\Backup" set path2="E:\Document\NewDoc" set path3="C:\ScanDoc" forfiles -p %path1% -s -m *.pdf /...
Nifriz's user avatar
  • 1,265
0 votes
1 answer
286 views

xcopy show only when files have been copied

I have made a script using xcopy that generates a csv log file with the date to check that my copies are done. I would like to be able to display only when it has copied files, and not display ...
Caeko's user avatar
  • 13
0 votes
1 answer
711 views

Error "Invalid path 0 File(s) copied" using xcopy in batch file

I want to start with a little disclaimer: I read this thread on a similar issue to mine, but it seems like the solution doesn't work. It might just be me not understanding it completely but here I am ...
Spyro 999's user avatar
0 votes
1 answer
7k views

Copy files from One Server to Another Server using Batch Command - Windows machine

How to copy files from one server to another server(VM) using a windows batch command. ? I have used below command syntax : xcopy \\source_path \\serverIP\Destination_path /s /a /d example : xcopy \\c:...
Gopinath D's user avatar
0 votes
0 answers
141 views

Linux: install pip packages using xcopy

I am looking for help to install pip packages using xcopy. I am running a container, in which i need to bring up jupyter. I do not own the container docker file. So when container comes up, i want to ...
Abhay's user avatar
  • 584
-1 votes
2 answers
3k views

XCOPY - How to exclude a certain file name?

This is my current xcopy command: xcopy C:\SourceCodeOld\Release\"Source Code"\*.vb C:\SourceCodeNew\"Source Code"\ /S /Y /R In several subfolders, I have a file named "...
Alexander's user avatar
1 vote
1 answer
5k views

Bat file to copy Folders and Files

I have a list of folders and files in a text file, (%File_list%). My batch reads from the text file for the objects to copy. I need it to copy files and folders from one within a folder (%src_folder%),...
Faizal's user avatar
  • 11
2 votes
1 answer
858 views

IIS Shadow Copied DLL accessing dependency DLLs from bin location

I am trying to resolve an issue with ASP.Net Framework 4.8 site using EFCore 3.1.16 in IIS. Microsoft.Data.SqlClient has a process lock on SNI.dll which causes issues with xcopy deployment in IIS. I ...
GraemeMogo's user avatar
3 votes
3 answers
2k views

How to show output of xcopy in powershell script while it's running

I have this powershell scrip where I want to copy files from our production server to our test server, and only have it copy files which are newer or changed. The script itself has many more functions ...
SuperDre's user avatar
  • 194
0 votes
0 answers
1k views

How to specify in a file a list of files and folders to exclude with xcopy or robocopy

Windows 10 I want to run the xcopy or robocopy command in a .bat file. I need to wildcard copy many files/folders, but exclude some files/folders. I have tried xcopy with /exclude:filename, but I ...
Lars - Washington's user avatar
0 votes
1 answer
193 views

Batch file to copy files into one folder

I'm trying to run a bat to copy all the files in a list.txt. to a destination folder, without copying the folders the files are in, and I can't seem to get it to run right. @ECHO OFF CHCP 65001 > ...
Nicho Hickman's user avatar
0 votes
1 answer
1k views

Batch File Xcopy specific file only

Would like to seek your help on creating simple bat file that will copy specific file from source to destination. Eg. Source = C:\Source Dest = D:\Destination File in source: 123.CSV 234.CSV 456.CSV ...
ATadz's user avatar
  • 11
3 votes
0 answers
343 views

How to make XCOPY in Visual Studio Post Build Event Command Line support both Linux and Windows?

How to make XCOPY in Visual Studio Post Build Event Command Line support both Linux and Windows? I have a post build event command line in my C# project and can works well on windows, but always ...
CuteLeon's user avatar
1 vote
1 answer
3k views

Xcopy sharing violation, how to still copy without skipping

I’m copying files from one directory to another with Windows xcopy command in cmake. Sometimes I run into situations where one file is already being used by another program, which results in a sharing ...
mikelowry's user avatar
  • 1,747
0 votes
2 answers
263 views

Need to merge 2 folders that have hundreds of thousands of files in each. VB.net

I need to merge these folders that have a TON of files in each directory. I would use folder.copy but that takes forever. I have been using xcopy process to handle this for the most part but I have ...
Zach_peterson4's user avatar
1 vote
2 answers
5k views

How to copy selected files from one folder to another in Batch file?

In folder C:\A i have afile.h afile.cpp bfile.h bfile.cpp and some other .h and .cpp files (windows 10) I want to copy only afile.h afile.cpp bfile.h bfile.cpp to C:\B folder and replace them if files ...
kingmihi's user avatar
0 votes
1 answer
865 views

xcopy works from command prompt but fails in batch file using variable

I am trying to run a batch file against a list of remote computers. The batch file will check for a specific file, if the file is not found in the directory it should be copied there. I am using the %%...
zimboy's user avatar
  • 1
0 votes
2 answers
394 views

Need help figuring out what this xcopy command does

Can anyone tell me what this command is doing on CMD: xcopy f2 ..\desktop /d /e /f /i /l My objective: Figuring out how to use xcopy to move one directory with all its contents to another directory ...
Birdie's user avatar
  • 57
0 votes
0 answers
63 views

xcopy to a file instead of a directory, can it be reversed?

yeah, I did this: xcopy * . * d:\save The directory didn't exist and so a I have a file called 'save' .. Is it possible to extract that or xcopy /? back to the original files ? Thanks.
Done's user avatar
  • 1
0 votes
0 answers
1k views

Copy files from Source to Destination if they don't already exist

I use robocopy to copy SQL Server Transaction Log files from Primary server to Standby server (due to a specific reason I don't use SQL log shipping job to copy). SQL Server generates a new file every ...
Peter Nguy Nguyen's user avatar
0 votes
1 answer
343 views

Is there a possibility to pass variable in Exclude parameter of xcopy command

So basically I am looking for some way to pass variable to exclude parameter of xcopy command. Is it possible? Because it does work for source and destination path So something like this $...
Pawan Nogariya's user avatar
0 votes
1 answer
592 views

Xcopy does not copy file beofre select F for file or D for directory

So I try to copy file via Xcopy with this simple command: xcopy c:\file.doc d:\file.doc And i received this output: Does C:\file.doc specify a file name or directory name on the target (F = file, D = ...
user1860934's user avatar
0 votes
0 answers
3k views

Robocopy: Copy file, and if an identical file name exists in destination, keep BOTH

I've got this line of code using Robocopy: Robocopy C:\Autopilot_Export \\Zapp\pc\PLI\Hash_Exports Autopilot_CSV.csv I will have multiple computers networked into this server running this same script ...
newman's user avatar
  • 97
1 vote
1 answer
385 views

Copy multiple files from a single source to different destinations, (recursively)

I have 4 files in a single source folder (c:\sandbox\image\). Files are as follows, INSTALL1.SWM, INSTALL2.SWM, INSTALL3.SWM, INSTALL4.SWM. My destination structure is c:\sandbox\extract\*\*\* I want ...
Daniel's user avatar
  • 11
0 votes
1 answer
186 views

Moving contents using batch only if it's held in a subdirectory, not root folder

I'm trying to write a script that exclusively moves files from a source folder if they're in a subfolder (IE dayfolders for images) and NOT if the file is just sitting in the root directory. The ...
MeowfaceMcGee's user avatar
0 votes
0 answers
194 views

The xcopy command that was running before is not working now in power shell

Be sure, thecommand below was working one year ago set source=C:\Users\sinan.almac\OneDrive - Terrafile\EKOL set destination=\uzyttn\Excel\EKOL xcopy %source% %destination% /y her is the error message ...
Sna's user avatar
  • 1
0 votes
1 answer
452 views

Batch File - Loop using xcopy with variable number of Variables?

I'm a paralegal, and need to create folders and files for each contract that comes in. The folders will be named to only the address, and inside there will be 2 empty folders, and 2 prepared files, a ...
drego5's user avatar
  • 3
0 votes
1 answer
1k views

use xcopy in package.json

I have a react application and a express server. I am serving react app through express server as a static page. I want to copy the build folder from the react application to server each time I build ...
Brutus's user avatar
  • 173
0 votes
2 answers
3k views

xcopy and Robocopy deleting destination file

I'm trying to copy some files from one server to another's shared folder, the thing is, it works sometimes, but quite often the xcopy and robocopy commands delete the destination file upon failure, ...
Adrian G's user avatar
0 votes
3 answers
126 views

xcopy fails in AppVeyor, works at home: Invalid number of parameters

The command xcopy "$SITEPACKAGES\\google" "build\\lib\\google" /i /e /h fails with Invalid number of parameters on Windows on AppVeyor (Visual Studio 2019). I’ve confirmed the ...
Yanone's user avatar
  • 305
1 vote
1 answer
157 views

why xcopy creates another new folder using batch file

I have created a simple batch script that only copies pdf file in the server. Copied file will be stored in a folder in desktop. But after copying there is a "New Folder" created. Why is ...
NewbieKid's user avatar

1
2 3 4 5
15