The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
2k 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 ...
1
vote
2answers
565 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 ...
0
votes
2answers
177 views

What's the correct syntax for using an IP address in xcopy?

I want to copy a set of files on a Windows computer to a number of Windows servers I have credentials for without having to go through RDC, theoretically a simple task. For this usage, the appropriate ...
0
votes
2answers
773 views

copy works where xcopy and robocopy does not work

Network admin allowed me to read-access only 1 file from a subfolder of a shared folder on a server and I don't have permissions to even view upper level folders, but when I open that folder I can see ...
1
vote
1answer
44 views

How to Copy File and Folder permissions but not folders and files?

I have two copies of same folder in windows. but the permissions of one of them are missing. How can I copy permissions of the original source to other? I know I can use the xcopy command but the data ...
0
votes
1answer
53 views

xcopy command does not work in a batch file

The command below works in CMD Prompt, but does not work in a batch file. xcopy "D:\Desenvolvimento\Repositórios GIT\driverXD\app\*" driverxd\ /e
0
votes
1answer
65 views

Batch File to xcopy multiple files from web server to share drive

I am trying to copy a group of files from a folder on my SharePoint site to a network share folder for manipulation "off-line". I am new to xcopy and batch files so trying to teach myself with ...
0
votes
1answer
85 views

.bat file xcopy based on operating system

I'm having trouble creating a .bat file to do the following; IF OS xp run xcopy IF OS Win 7 run xcopy Else exit To keep it simple I would like to the use IF EXIST "C:\Program Files (x86)\." THEN ...
0
votes
1answer
219 views

Why is my batch file doing nothing for 46 seconds before a forced quitting?

I have figured out what part of the code is doing this but dont know how to fix it... Here's the code: Set _Path=Private For /F "Delims=" %%I In ('Attrib "%_Path%"') Do Set _Attribs=%%I If ...
1
vote
0answers
17 views

I copied a folder with copy&paste instead of 'xcopy'. How to fix that?

I copied a folder (Windows Server 2003) with copy-paste instead of 'xcopy' or 'robocopy'. Now I lost the original permissions, and I can't re-do the copy process (can't access the original folder). ...
1
vote
0answers
377 views

I am getting Invalid Drive Specification when using xcopy to copy a sharepoint site to a backup location

I am getting Invalid Drive Specification when using xcopy to copy a sharepoint site to a backup location. I am executing the command via cmd window from the sharepoint server itself. I have tried it ...
0
votes
0answers
54 views

How do I xcopy only specific subdirectories and files within subdirectories

Here is an example of what I have: c:\top\dir1\dir2\dir3\desired_dir1\desired_file.abc c:\top\dir1\dir2\dir3\desired_dir1\unwanted.file c:\top\dir1\dir2\dir3\unwanted_dir2\some.file ...
0
votes
0answers
51 views

Copy folder structure on Windows except for one folder with files

I need to copy folder structure without files except for one sub-folder. That is I want to copy the folder structure without files plus only one of the sub-folder to be copied with its content. I can ...
0
votes
0answers
289 views

access denied in copying batch file

Im trying to write a batch file that copy itself to startup folder, so the file will be executed each restart. Im using this command, but I keep getting "access denied": @echo off XCOPY txt.txt ...
0
votes
0answers
340 views

“There is no disk in the drive.” error message from an application that was just copied from a CD with batch file xcopy but doesn't require it at all

All, I have an interesting problem that I have looked everywhere for an answer and have come up short. Hopefully someone out there can shed some light as to why this is happening. I have a CD that ...
0
votes
0answers
756 views

How can I specify an /EXCLUDE file with spaces in it to xcopy?

I have tried to specify an /EXCLUDE filename with spaces in it to xcopy, but it always chokes. How can I specify such a path to xcopy without copying the /EXCLUDE files into the current directory and ...
0
votes
0answers
378 views

Why is the /d flag not working with xcopy?

Am I going crazy? I'm trying to copy logfiles that were generated today: xcopy i:\logs c:\logs /d:05-02-2012 It's copying zero files even though there should be some files modified today. What am I ...