0
votes
2answers
30 views

copying file from UNC path to startup folder on Windows 7 machines

I have sucessfully figured out how to copy a file to "\machinename\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\startup" however I want to run this as part of an existing startup batchfile. I ...
1
vote
1answer
59 views

Batch copy gives errors, xcopy works fine

I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon ...
2
votes
2answers
40 views

Is there a way to trigger a copy via command line that uses the progress dialog on Windows 8?

I'm writing a batch job that needs to copy a directory of database backups from a network drive to the local machine. When I manually move these files in Windows 8 I get a nice copy dialog that shows ...
1
vote
0answers
107 views

Robocopy; How to copying missing files to a different location from original copy?

I am using Robocopy to transfer around 1 tb worth of files from an external drive to a virtual Windows Server 2008 machine hosted on an ESXi 5.1 VMWare server using USB pass-through. I used the ...
2
votes
4answers
549 views

What is the equivalent of “cp --verbose” on windows for copy?

I 'm using the command copy in a build script to export apk files in a specific folder on the network and rename it by adding the release number as a suffix. I tried giving the option -v but I'm ...
1
vote
1answer
91 views

How can I keep XCOPY from copying more than it should?

I have a script for copying files from one folder to another. The XCOPY command looks like this: XCOPY /E /Y /V /D:%date% %reportsDataPath% TMP\ The date flag is supposed to make it copy only ...
1
vote
2answers
3k views

How to optionally copy and rename a file in Windows?

Basically, in an automated batch file, I want to copy and rename a file if the destination file is missing or older. There are several variants, which do not quite work: copy /Y c:\source\a.file ...
0
votes
1answer
905 views

Command to Xcopy folders across the network and rename the folder at destination as the date

I'm using Xcopy to copy a folder across a network XCOPY "C:\Documents and Settings\Administrator\Desktop\File\Output*." "C:\new" /s /e /c I want the folder at the destination to be named with ...
1
vote
2answers
118 views

How to append a CR to end of all .txt files in a directory

Is there an easy way to do this? I'm actually combining about 500 files using copy *.txt myoutputFile.txt. The problem is, that command inserts the new/next file at the current/end position of the ...
0
votes
0answers
37 views

How can I un-concatenate a bunch of files?

I accidentally made a backup of folder using "copy folder folder_backup" and got a file called folder_backup. It contains all the bits of the folder. And I accidentally deleted the folder. How do I ...
0
votes
3answers
191 views

Copy files with a certain extension into a folder

I want to find all the PDF files from the computer and put them into a folder. So far, I have this: mkdir d:\test chcp 65001 d: FOR /f "tokens=*" %%a in ('dir /s /b *.pdf') DO copy "%%a" d:\test\ ...
0
votes
2answers
2k views

XCOPY not copying directories

I am trying to copy one directory to another directory. It seems I can copy a file but directories won't copy. Running this at cmd: XCOPY C:\Drivers C:\Users\lenovo\Desktop Gives 0 File(s) ...
0
votes
1answer
54 views

Pattern matching for directory path

Can I use pattern matching with the copy or move command? What I wanted to do is copy the file a.txt from D:\1\2\datehere\a.txt to another folder let us say D:\new. The problem is that the source ...
1
vote
1answer
7k views

How to use Robocopy to copy a folder structure into all (sub)folders located under one directory?

Is there anyway for me to quickly take an empty folder structure I have created on my desktop and copy it to 488 other folders all located on a network drive but in the same folder? My primary ...
1
vote
1answer
1k views

Copying only newer files from one folder to another

I have 2 folders with files. These files are the product of some build process. The first folder is the outputs of previous build while the latter is the output of the current build. I would like to ...
0
votes
3answers
721 views

Copy file after change, cmd Windows

I'm using this command to copy a file on a daily basis. COPY "E:\ClipData.txt" "Clipboard\ClipData.txt" But is there anyway without making it complicated, to copy the file after the source file has ...
1
vote
1answer
234 views

Command-line sort and copy text files to one single file renders an error

I stumbled on question 217394 which explains how to copy files sorted alphabetically into one single file. Trying to implement the command myself rendered the following error message: The system ...
0
votes
1answer
176 views

Create .img of a disk from command line?

I need to create a .bin or .img of a disk from the command line. I have tried using rawcopy (an .exe that I downloaded from the internet), but that is rubbish. Does anyone know of other ...
3
votes
2answers
8k views

How to copy all files of a certain type into a folder from command prompt?

I want to copy all files of a certain type (like .docx, .pdf, etc) on my PC into a folder. How can I do that?
0
votes
2answers
704 views

Create new empty directory tree from existing tree with files

I have a large directory tree with lots of files. I would like to re-create the directory structure in a new location, but only the directories, not the files. I've checked cp's man page, but don't ...
0
votes
3answers
1k views

Command/script to copy files with certain ext, which may have the same name, from folder structure to singe directory and rename

From a source directory structure (multiple folders), I need to copy all csv files to a single target directory. I found a command to do this, though files of the same name exist within different ...
0
votes
1answer
357 views

CMD - Prevent user copy files in a directory to somewhere else

Would be happy to know if there's a way to prevent users to copy files from a directory under local file system to somewhere else(e.g. to USBs, or to another folder in the same local file system)? ...
1
vote
1answer
1k views

DOS copy recursive, but squash directory structure

Similar to How can I copy file recursively ignoring destination directory structure? but in DOS. I'd like to copy all files recursively, but in the destination folder I'd like to squash the directory ...
2
votes
1answer
2k views

Copy all files with a certain extension into a single directory (w/o directory structure)

I have been trying to copy all files in the various subdirectories that have a jpg extension located on C: into a single directory on D:. I don't want to preserve the directory structure. This is as ...
0
votes
2answers
2k views

Native .iso generation in Windows CMD?

Is there some way to natively create a .iso file from a partition or directory via Windows CMD? From what I gather the answer is no, but coming from Linux, where dd accomplishes this so easily, it ...
4
votes
2answers
6k views

What is the benefit of copy over xcopy on the command line?

I know that xcopy has more options however is there some benefit to using copy rather than xcopy?
0
votes
1answer
940 views

getting “Invalid Parameter #10” when attempting to copy folder using robocopy

I'm trying to copy a folder on my internal hard drive to my external hard drive using robocopy with the following command: robocopy "source folder" "destination folder" *.* /E /DCOPY:T /COPYALL ...
1
vote
2answers
574 views

xcopy files and directory

I have a folder named "C:\Jobs\job#1" , "C:\Jobs\job#2" "C:\Jobs\job#3" etc and a lot of directories and sub-directories under it. I want to get the all the directories under Jobs and xcopy them to ...
2
votes
3answers
8k views

How to copy a file from unix to windows machine, from commandline

How to copy a file from unix machine to windows machine, from commandline.
7
votes
1answer
2k views

Linux: What is the best way to copy from a damaged HD?

I get I/O errors from my storage HD when i try to copy files. These are large raw video files, so I can tolerate errors. cp stops on the first read error and scp/rsync complains and deletes the copy. ...
2
votes
0answers
1k views

command line remove read only flag on all subfolder entries or overwrite read only files with robocopy

I need one of two things to work: I use robocopy to copy all sub-files and sub-folders from one folder to another, and the destination contains older files + files not in the source, and I need the ...
5
votes
1answer
4k views

How to copy files inside several folders into another directory

I have 6 CDs with PDF files inside a lot of folders (Like Prep1, Prep2... and so on.) I need to copy all the PDF files inside folders to my C:\ and then burn them all. Is there a command in cmd ...
3
votes
2answers
3k views

How can I get command prompt to merge my files in name order?

I'm using the copy command in command prompt to merge all the files in a directory, for a number of directories. The problem is, I need to edit the first file in each directory before I merge. This ...
2
votes
1answer
237 views

'copy' always leaves a blank line at the end of a file. Why?

When I use the DOS Copy command to copy multiple files into one file the result always has an extra blank line (cursor return line feed) at the end. How do I avoid creating this blank line?
0
votes
2answers
337 views

Folder transfer over poor sat link

Does anyone know of a tool (exe or script etc.) to manage transfer of large folders over a poor network connection? It would need to be able to handle very slow speeds and network outages, and keep ...
3
votes
4answers
10k views

Is it possible to copy a set of files, but automatically skip if file already exists?

I know that the copy command has an option to automatically replace a file if it already exists, but I want to know if it is a way to copy the files only if they not already exist (/Y). I do not know ...
0
votes
1answer
178 views

marking text in Windows 7's command prompt

I use Windows 7's command prompt (cmd.exe) for various tasks. In order to copy text from it, I right click and choose Mark, and then mark the text I want to copy. Sometimes while doing this, the ...
1
vote
1answer
1k views

specify the sort order in “copy /b *.dat foo” in Windows cmd

Normally, when I do a copy /b *.data foo in Windows cmd, the *.data files are catenated in the sorted order into the destination file foo. This matches my desired behavior. However, I just met a ...
0
votes
1answer
157 views

How do I copy files from the command prompt?

I need to copy a file from one directory to another and at the same time, change the file extension. How do I do this?
2
votes
4answers
3k views

Can Windows' copy command handle multiple files?

On a Unix system, this command copies two files to a folder named folder: cp foo bar folder On Windows, this is not a valid command: copy foo bar folder The syntax of the command is incorrect. ...
1
vote
3answers
2k views

Command line tool for copying changed files

Is there a Windows command line tool which will just copy changed files from one directory to another? I do not want to compare file dates, but the actual content. Total Commander has such a function ...
51
votes
6answers
75k views

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 ...
1
vote
1answer
895 views

Copy images using a single dos command

I'm wondering if it's possible to copy only images files from a directory. For example, if source directory has: a.jpg b.gif c.png d.txt I want to copy only the images using one command, to get ...
3
votes
3answers
19k views

Is there a Windows command line tool to copy files to remote computers?

I'm looking for a way to copy files over to/from remote Windows hosts, and need to provide domain user credentials as part of the process, similar to the way psexec does. I know I can use net use to ...
0
votes
1answer
358 views

How to distinguish folders from files in a batch script? (Or how to copy & rename-timestamp them indiscriminately?)

I want to create a batch file to copy files or folders in a specified directory and append the date and time to their names. Here's my actual code: @echo off Set _bpath=T:\Backup\ if [%1]==[] goto ...
0
votes
3answers
114 views

Copying folders in Windows

I have the following folders on a Windows machine C:\FolderToCopy C:\Dest Both folders are empty. I want to execute a copy operation from a command prompt so that I have this in the end: ...
4
votes
6answers
569 views

How can I get the “dir” and “copy” commands to operate on “*.xyz” but not “*.xyz~”?

When I use copy *.txt somefolder\ the system seems to copy all *.txt~ files too, which is not what I want. A similar same effect can be seen with dir: C:\Users\Paul\Documents\Programs\Proffy>dir ...
1
vote
2answers
783 views

How to copy XP service log file during reboot or shutdown using command prompt?

Anybody know of a quick way of copying a log file used by a Windows XP service either before the service starts (during boot) or after the service has stopped (during shutdown)? Preferably using the ...