We help IT Professionals succeed at work.

Win2008 Server scheduled task will not process all of bat file commands

tqsneed
tqsneed asked
on
Medium Priority
606 Views
Last Modified: 2012-05-06
I have a bat file called by a scheduled task.  Bat file contents in code section below.
The scheduled task has been launching the bat file every day at 0215.  the file copies a source file from Dir A to DIR b, copies from DIRA to DIR C, deletes it out of DIR A and then renames the file in DIR C with a date appendage.
The win2000 server scheduled task formerly using this bat file worked perfectly.
The win2008 server omits the first step copy from DIR A to DIR B.

@Echo Off
 
IF EXIST F:\HOME\GC-CORP\CECGLINT.CSV (type G:\GCCINT\INITIAL\CECGLINT.CSV >> F:\HOME\GC-CORP\CECGLINT.CSV) else (
 COPY G:\GCCINT\INITIAL\CECGLINT.CSV F:\HOME\GC-CORP\CECGLINT.CSV
 )
REM -- CREATE HISTORY FILE
 copy G:\GCCINT\INITIAL\CECGLINT.csv G:\GCCINT\HISTORY\CECGLINT.CSV
 ren G:\GCCINT\HISTORY\CECGLINT.CSV CECGLINT-%date:~4,2%-%date:~7,2%-%date:~10,4%.CSV
 REM -- DELETE DTS'D FILE
 DEL G:\GCCINT\INITIAL\CECGLINT.CSV

Open in new window

CECGLINTxml.txt
Comment
Watch Question

Author

Commented:
also - when the bat file is run manually, it works correctly
How do the permissions and ownership of directory A differ from B and C.
. = ?

Author

Commented:
the directory permissions should be the exact same but let me verify
Commented:
Win2008 wouldn't let us reference mapped drive.
Resolved

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.