Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,i have this vbs script to copy files from a mapped drive(F:) to my local drive(D:)
------
M = Month(now()-1)
D = Day(Now()-1)
if M < 10 then M = "0" & M
if D < 10 then D = "0" & D
strFilePath = Year(now()-1) &"-" & M &"-" & D
strFilePath = "F:\RADIUS Accounting " & strFilePath & ".csv"Set fso = CreateObject("Scripting.FileSystemObject")
call fso.CopyFile (strFilePath , "D:\RADIUS Accounting.csv")
set fso = nothing
-------
and i have a task to do this operation daily the script fails when called from task sch,but it runs ok manually,i looged in with the same account that runs the task,also this account has authority on both source and dest paths,..any ideas...!!

My limited experience with tas sched & AT has been mostly bad.
It acts not smart enough to 'get' the path.
Notice in this session that the tcc will not run without the full path and name, even though it's in the path. Also notice that the first task supposedly 'ran' because it's off the list; but it did not *DO* anything.
################
C:\temp\->at
Status ID Day Time Command Line
----------
1 Today 20:51 c:\tc\bin\tcc.exe
2 Today 20:51 c:\tc\bin\tcc
3 Today 20:51 tcc.exeC:\temp\->at
Status ID Day Time Command Line
----------
Error 2 Tomorrow 20:51 c:\tc\bin\tcc
Error 3 Tomorrow 20:51 tcc.exe
##############
If at first you don't succeed, you're about average.M2

Seems it's not smart enough to do an internal command either.
####
C:\temp\->at
Status ID Day Time Command Line
-----------------
Error 2 Tomorrow 20:51 c:\tc\bin\tcc
Error 3 Tomorrow 20:51 tcc.exe
Error 4 Tomorrow 20:59 copy *.bak s:\
Error 5 Tomorrow 21:00 copy c:\temp\-\*.bak s:\
###
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |