FastCopy not executing from Task Scheduler

2,289 views
Skip to first unread message

kenngul...@gmail.com

unread,
Apr 9, 2018, 7:28:28 PM4/9/18
to FastCopy support forum
I have the following batch file set to run through Task Scheduler:

::::::::::::::::::::::::::::::::::::::::::::::::::::
::Create a log file containing todays date
::LogPath is the path to the folder where the log file will be saved
::LogFileName is a descriptive name that will be added after the date
::LogFileExt is the extension to be used 
::First get the date into a variable. Then convert the '/' to '-' so
::the '/' won't be mistaken as a command line switch
::if the file exists, a blank line and a separator line of equal signs
::will be written at the end of the file in case the script runs more than
::once a day.
::::::::::::::::::::::::::::::::::::::::::::::::::::
setlocal
set LogPath=C:\Logs\
set LogFileExt=.log
set LogFileName=Test Backup%LogFileExt%
::use set MyLogFile=%date:~4% instead to remove the day of the week
set MyLogFile=%date%
set MyLogFile=%MyLogFile:/=-%
set MyLogFile=%LogPath%%MyLogFile%_%LogFileName%

::Note that the quotes are REQUIRED around %MyLogFile% in case it contains a space
If NOT Exist "%MyLogFile%" goto:noseparator
Echo.>>"%MyLogFile%" 2>&1
Echo.===================>>"%MyLogFile%"

:noseparator

echo.======== Starting Delete ======== >>"%MyLogFile%"
echo.%Date% >>"%MyLogFile%"
echo.%Time% >>"%MyLogFile%"

:startbatch

C:\Progra~1\FastCopy\FastCopy.exe /cmd=delete /speed=full /error_stop=FALSE /no_confirm_del /force_close "Y:\Critical"
Echo.======== Delete Complete ========>>"%MyLogFile%"
echo.%Date% >>"%MyLogFile%"
echo.%Time% >>"%MyLogFile%"

Echo.======== Starting Daily Critical File Backup to ACNNas1 ========>>"%MyLogFile%"

C:\Progra~1\FastCopy\FastCopy.exe /cmd=force_copy /filelog="%MyLogFile%" /speed=full /error_stop=FALSE /force_close /acl=FALSE /verify=TRUE /balloon(=FALSE) "D:\Qbooks" /to="Y:\Critical\Qbooks"

Echo.======== Backup Complete ========>>"%MyLogFile%"
echo.%Date% >>"%MyLogFile%"
echo.%Time% >>"%MyLogFile%"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
endlocal

-----------------------------
If I run this batch file manually, it works fine without any errors.  When I try to run it using the Task Scheduler, it fails to execute either of the FastCopy commands (won't delete nor will it copy).  It had previously worked without a problem and then last week it started failing.  There were no updates on the server last week.  This is running on MS Server 2008 R2 (part of SBS 2011).

I would appreciate any suggestions about how I am to get this to work again.  

John Simons

Hiroaki SHIROUZU

unread,
Apr 9, 2018, 8:37:40 PM4/9/18
to FastCopy support forum
Can you tell me FastCopy version and the fastcopy.log when it was failed.
And Y drive is a local or network drive?

kenngul...@gmail.com

unread,
Apr 12, 2018, 2:58:15 PM4/12/18
to FastCopy support forum
Here is the log for the scheduled session:
=================================================
FastCopy(ver3.41 (NoUI)) start at 2018/04/10 22:15:01

<Source>  Y:\Critical
<Command> Delete all
-------------------------------------------------
FindFirstFileEx(del)(The system cannot find the path specified.3) : Y:\Critical

TotalDel   = 0.0 MB
DelFiles   = 0 (0)
TotalTime  = 0.1 sec
FileRate   = 0.00 files/s

Result : (ErrFiles : 0 / ErrDirs : 1)

=================================================
FastCopy(ver3.41 (NoUI)) start at 2018/04/10 22:15:01

<Source>  D:\Qbooks
<DestDir> Y:\Critical\Qbooks
<Command> Copy (Overwrite) (with Verify)
<FileLog> C:\Logs\Tue 04-10-2018_ACNNas3 Daily Critical File Backup.log
-------------------------------------------------
GetVolumeInformation(The system cannot find the path specified.3) : Y:\
Initialize Error

The Y: drive is a network share

Hiroaki SHIROUZU

unread,
Apr 12, 2018, 10:22:37 PM4/12/18
to FastCopy support forum

athl...@spiritacademy.org

unread,
Apr 18, 2018, 2:18:53 AM4/18/18
to FastCopy support forum
Based on your recommendation, it was clear that the server was needing to 'wake up' the connection to the remote drive before it could start writing to it.  So, I modified the batch file to include a call to that drive letter and then to perform a "dir" command.  Here is the revised batch file code:

::::::::::::::::::::::::::::::::::::::::::::::::::::
::Create a log file containing todays date
::LogPath is the path to the folder where the log file will be saved
::LogFileName is a descriptive name that will be added after the date
::LogFileExt is the extension to be used 
::First get the date into a variable. Then convert the '/' to '-' so
::the '/' won't be mistaken as a command line switch
::if the file exists, a blank line and a separator line of equal signs
::will be written at the end of the file in case the script runs more than
::once a day.
::::::::::::::::::::::::::::::::::::::::::::::::::::
setlocal
set LogPath=C:\Logs\
set LogFileExt=.log
set LogFileName=ACNNas3 Daily Critical File Backup%LogFileExt%
::use set MyLogFile=%date:~4% instead to remove the day of the week
set MyLogFile=%date%
set MyLogFile=%MyLogFile:/=-%
set MyLogFile=%LogPath%%MyLogFile%_%LogFileName%

::Note that the quotes are REQUIRED around %MyLogFile% in case it contains a space
If NOT Exist "%MyLogFile%" goto:noseparator
Echo.>>"%MyLogFile%" 2>&1
Echo.===================>>"%MyLogFile%"

:noseparator

echo.======== Starting Delete ======== >>"%MyLogFile%"
echo.%Date% >>"%MyLogFile%"
echo.%Time% >>"%MyLogFile%"

:startbatch
Y:
dir
C:\Progra~1\FastCopy\FastCopy.exe /cmd=delete /speed=full /error_stop=FALSE /no_confirm_del /force_close "Y:\Critical"

Echo.======== Delete Complete ========>>"%MyLogFile%"
echo.%Date% >>"%MyLogFile%"
echo.%Time% >>"%MyLogFile%"
NET STOP "QuickBooksDB24"

Echo.======== Starting Daily Critical File Backup to ACNNas3 ========>>"%MyLogFile%"
Y:
dir
C:\Progra~1\FastCopy\FastCopy.exe /cmd=force_copy /filelog="%MyLogFile%" /speed=full /error_stop=FALSE /force_close /acl=FALSE /verify=TRUE /balloon(=FALSE) "D:\Qbooks" /to="Y:\Critical\Qbooks"

Echo.======== Backup Complete ========>>"%MyLogFile%"
echo.%Date% >>"%MyLogFile%"
echo.%Time% >>"%MyLogFile%"
NET START "QuickBooksDB24"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
endlocal

While that worked to allow the Delete portion of the batch file, it is still failing on the copy portion of the batch file with the following error in the FastCopy log:
=================================================
FastCopy(ver3.41 (NoUI)) start at 2018/04/17 22:15:05

<Source>  D:\Qbooks
<DestDir> Y:\Critical\Qbooks
<Command> Copy (Overwrite) (with Verify)
<FileLog> C:\Logs\Tue 04-17-2018_ACNNas3 Daily Critical File Backup.log
-------------------------------------------------
GetVolumeInformation(The system cannot find the path specified.3) : Y:\
Initialize Error

Again, if I execute this batch file 'manually', it runs without any error.  Any other clue what may be causing it to fail?

Hiroaki SHIROUZU

unread,
Apr 19, 2018, 4:28:22 AM4/19/18
to FastCopy support forum
??

You have to use "NET USE" command to enable network drive before copying.
Dir command has no effect.

kenngul...@gmail.com

unread,
Apr 25, 2018, 4:15:07 PM4/25/18
to FastCopy support forum
Thank you for your help with this.  

Inserting the NET USE command did the trick.
Reply all
Reply to author
Forward
0 new messages