12 votes
Accepted

How to predefine file/directory parameter to xcopy

How do I force xcopy to assume the destination is a file not a directory? Add an asterix * to the destination file name, like so: C:\IAM\New_ADuser_mustang.ps1* When copying a single file with ...
DavidPostill's user avatar
  • 157k
9 votes

Using xCopy to create entire folder structure, including root folder name and all files

I need the destination to include a folder called "Public" containing all files, folders, subfolders, everything. Use the following command: xcopy c:\Public\* d:\MyNewDir\Public /s /i /s - Copy ...
DavidPostill's user avatar
  • 157k
9 votes

How to copy a directory on Windows, preserving timestamps of all directories being copied

Make a compressed archive of the data, such as a .zip file. You should then be able to copy that .zip file to any drive and decompress it. All the folders and files should then appear with all their ...
Monomeeth's user avatar
  • 1,289
9 votes
Accepted

How do I track the progress of XCopy command while It's running?

If you are using software someone else made (like XCOPY) then the only easy route is to just end up being limited to whatever functionality was placed in there by the people who made that software. ...
TOOGAM's user avatar
  • 15.8k
8 votes

How to copy a directory on Windows, preserving timestamps of all directories being copied

cmd>robocopy from to /dcopy:dat // preserves folder timestamps.
user1227808's user avatar
5 votes

Files copied using xcopy command are hidden in destination

I faced a similar issue when using xcopy. The folder has been set as system file and has become hidden from Windows Explorer To unhide the folder, run this command: attrib -s -h D:\hiddenfoldername ...
Nickson Yap's user avatar
5 votes

Copying only newer files from one folder to another

I like ROBOCOPY instead. Used XCOPY for years then found a need for a restartable copy operation over a slow/twitchy internet connection. ROBOCOPY src dest /s /e /xo or mirror ROBOCOPY src dest /...
Joe's user avatar
  • 51
5 votes
Accepted

Is there Windows copy command that mimic Unix `cp -r` behavior?

Just run cp -r c:\libsrc\include d:\temp\dest in PowerShell. It'll work as expected. It's actually the alias to Copy-Item -Recurse -Path c:\libsrc\include -Destination d:\temp\dest With xcopy or ...
phuclv's user avatar
  • 27.8k
4 votes
Accepted

Xcopy doesn't copy, just 0?

You're using the wrong slash (/) in your paths, making them invalid. Xcopy doesn't know how to handle those invalid paths, and therefore copies no files. Use the backslash (\) instead. i.e.: xcopy ...
Ƭᴇcʜιᴇ007's user avatar
4 votes

How to copy a directory on Windows, preserving timestamps of all directories being copied

I wince at answers that suggest a utility I've never heard of. But FastCopy worked for me. It preserved directory timestamps (both modified and created I think), where @#$%& Windows failed to. ...
Bob Stein's user avatar
  • 1,421
4 votes

How to copy a directory on Windows, preserving timestamps of all directories being copied

Total Commander preserves directory timestamps, at least for me, but you need to tell it to do that in options dialog first. Click Configuration → Options, select Copy/Delete (under Operation in ...
Krzyś's user avatar
  • 101
4 votes
Accepted

How to copy one directory to another with window command prompt?

Only sample.txt was copied to folder1 You need to properly specify the target directory name. Use one of the following commands: robocopy folder2 folder1\folder2 /COPYALL /E Or: xcopy folder2 ...
DavidPostill's user avatar
  • 157k
4 votes

How do I track the progress of XCopy command while It's running?

You can view that in task manager. If total file size to be downloaded is 4 GB then go to the program Task Manager -> Details tab -> Right click -> Select columns -> I/o write bytes ...
K P's user avatar
  • 41
4 votes
Accepted

Copy several files and send each to a specific subfolder

This is the kind of thing that's easy with a Unix shell. You could do this with bash as well but here's how you might do it with the free demo version of my Hamilton C shell. (Yes, I'm the author.) ...
Nicole Hamilton's user avatar
3 votes
Accepted

Xcopy: why /x (System Access Control List information)

Why should I care about SACL information? Normally the /x option is used because you want to preserve the security settings between the source and target file. Note: /x: Copies file audit settings ...
DavidPostill's user avatar
  • 157k
3 votes

How to copy a directory on Windows, preserving timestamps of all directories being copied

SafeCopy truly copies all files and folders, including the date and time. It is free too! https://www.elwinsoft.com/safecopy-free.html
Rick Shaddock's user avatar
3 votes

Copying many files without stopping on errors on OSX

I use Beyond Compare for exactly this purpose (it's commercial software but has a free trial). You tell it to copy a file, a folder, or a whole drive or any combination and it finishes to the end of ...
Tim D's user avatar
  • 31
3 votes
Accepted

How is this a cyclyc copy?

I bet it is because you have the slashes the wrong way and it therefore thinks you want to copy from the current folder to the current folder. In windows systems, paths are expressed using a ...
LPChip's user avatar
  • 61.5k
3 votes
Accepted

xcopy.exe exists in every Windows system?

This Powershell script (needs to be run as admin) can be used to check for the presence of xcopy and copy it from a network server if not present; if path doesn't exist, it will create it as well. $...
guyhosuetreehouse's user avatar
3 votes
Accepted

How rename files copied via Robocopy if it exist but with different modify date

As noted since robocopy does not provide rename. So you end up with something like this: $src = 'D:\Temp\Src' Get-ChildItem -Path $src | Format-Table -AutoSize # Results <# Directory: D:\Temp\...
postanote's user avatar
  • 4,866
3 votes
Accepted

copy folders and content to a external drive

You are overcomplicating things. If you are trying to copy a directory recursively (preserving its structure and the files within), the following should work fine: xcopy d: j: /s /e
Joseph's user avatar
  • 2,168
2 votes

Why is xcopy returning "invalid number of parameters"?

My discovery was that I needed double forward slashes on options c:\windows\system32\xcopy.exe //f //r //i //d //y * "..\bar\"
Kenneth Hov's user avatar
2 votes

Copying many files without stopping on errors on OSX

Teracopy has released a Mac version which you can download from the Apple store.
mcwizard's user avatar
  • 123
2 votes

How to copy folders on same NTFS drive using hardlinks?

No 3rd-party software needed. This can be accomplished with PowerShell. Here's a pipeline-enabled function that takes a source path ($Path) and a "mirror" path ($MirrorPath). It populates ...
Keith Miller's user avatar
  • 9,630
2 votes

How to copy folders on same NTFS drive using hardlinks?

It's a bit of a hack but: Make a regular full copy with the GUI. Copy/paste etc. Watch your disk space disappear. Run DupeGuru with the source set as reference and the dupe as "normal" When ...
Tomachi's user avatar
  • 264
2 votes

Copy Folder in Windows CMD

The following command should do what you're trying to accomplish: xcopy folderOne folderTwo\folderOne /i /s
n8te's user avatar
  • 7,591
2 votes

batch copy folder located by guid

Naming a Volume differs from Naming Files, Paths, and Namespaces. Next script shows possible approach how to get drive letter currently assigned to a volume. Uses Win32_Volume class: The ...
JosefZ's user avatar
  • 13.2k
2 votes
Accepted

XCopy encounters a sharing violation, how to handle

The /E parameter copies directories and subdirectories, including empty ones. Just add that, and the problem is solved. The /C parameter continues copying even if errors occur. That should skip ...
Overmind's user avatar
  • 10.1k
2 votes

How to copy one directory to another with window command prompt?

xcopy copies only content of folder2 to folder1. You should try this, as now you are under myfolder: cd folder1 xcopy ..\folder2 folder2 /S /I
jacouh's user avatar
  • 141
2 votes
Accepted

Share a folder with user 'Everyone' without asking to login?

Windows file sharing on Server 2012 takes NTFS permissions into consideration as well as the sharing permissions. I wouldn’t advise to use Everyone, rather a local user account on the server or a ...
mt025's user avatar
  • 3,361

Only top scored, non community-wiki answers of a minimum length are eligible