batch files
#1
batch files
Anyone good at batch files, its sequences and why the latter parts don't run..
i've got a batch file which runs some ntbackup jobs in sequence then copies them to another server.
The xcopy's don't run, any reasons why, I thought when one line is done it goes on to the next till the end?
i've got a batch file which runs some ntbackup jobs in sequence then copies them to another server.
The xcopy's don't run, any reasons why, I thought when one line is done it goes on to the next till the end?
#4
ok i tried robocopy, much better. Is it supposed to copy all the permissions down the folder file tree, because it didnt seem to. Just use /COPYALL /E ?
Also how do you deal with folders with spaces in the names?
What is the quickest easiest way of copying all folders all files and importantly ALL permissions from one server to another?
robocopy "\\server1\Dept\IT\Private\blah blah folder" "\\server2\Dept\IT\Private\blah blah folder" /copyall /e
Is this correct for folders and permissions to be copied correctly down the tree?
Also how do you deal with folders with spaces in the names?
What is the quickest easiest way of copying all folders all files and importantly ALL permissions from one server to another?
robocopy "\\server1\Dept\IT\Private\blah blah folder" "\\server2\Dept\IT\Private\blah blah folder" /copyall /e
Is this correct for folders and permissions to be copied correctly down the tree?
Last edited by Stefanie; 30 October 2008 at 10:52 AM.
#5
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
/sec for permissions also add /r:1 /w:1 otherwise it can take a while if it hits an error.
For folders with spaces add quotes.
if your backing up /xo only copies files that have changed.
For folders with spaces add quotes.
if your backing up /xo only copies files that have changed.
Trending Topics
#8
Later version have sec as well as copyall
Put in:
/tee /log:%temp%\robolog.txt
and post up the header and summary from the log.
Code:
/SEC :: copy files with SECurity (equivalent to /COPY:DATS). /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
Put in:
/tee /log:%temp%\robolog.txt
and post up the header and summary from the log.
#10
Scooby Regular
Join Date: Mar 2006
Location: Guernsey
Posts: 1,441
Likes: 0
Received 0 Likes
on
0 Posts
I know, it's sad, but I looked at the manual for Robocopy XP010 and in it, it says
"Note
The /TIMFIX or /SECFIX switches are no longer supported. If you have scripts that use these switches you must edit them to use /COPY: instead. /COPY:T replaces the old /TIMFIX, and /COPY:S replaces the old /SECFIX."
I was sure I'd had to redo a load of scripts when we moved to that version, as the older version didn't support really long paths. Not the sitch I remembered, but I'm glad I'm not completely gaga.
However I see that those switches are back in the Vista version.
Back to the OP's problem, ensure that the account you are using has adequate rights on the target server. If the target folder is a share, the share permissions must be full control, as well as the folders security, or you can't set ntfs permissions.
"Note
The /TIMFIX or /SECFIX switches are no longer supported. If you have scripts that use these switches you must edit them to use /COPY: instead. /COPY:T replaces the old /TIMFIX, and /COPY:S replaces the old /SECFIX."
I was sure I'd had to redo a load of scripts when we moved to that version, as the older version didn't support really long paths. Not the sitch I remembered, but I'm glad I'm not completely gaga.
However I see that those switches are back in the Vista version.
Back to the OP's problem, ensure that the account you are using has adequate rights on the target server. If the target folder is a share, the share permissions must be full control, as well as the folders security, or you can't set ntfs permissions.
Last edited by Removed.; 01 November 2008 at 02:21 PM. Reason: Changed quote to italics
Thread
Thread Starter
Forum
Replies
Last Post