Page 1 of 1
Writing Date and Time to a log file
Posted: 04 Apr 2016 12:39
by bmurtha
I want to keep a log of when ever a file is downloaded. I have this but it says incorrect function whenever I run it:
if exist D:\Test1\LOCK.TXT echo %DATE% %TIME% LOCKBOX.txt file found > LOCKBOX_LOG.txt
Re: Writing Date and Time to a log file
Posted: 04 Apr 2016 13:15
by Squashman
bmurtha wrote:I want to keep a log of when ever a file is downloaded. I have this but it says incorrect function whenever I run it:
if exist D:\Test1\LOCK.TXT echo %DATE% %TIME% LOCKBOX.txt file found > LOCKBOX_LOG.txt
I am pretty certain your error message is not coming from that code. I see nothing wrong with it.
Re: Writing Date and Time to a log file
Posted: 04 Apr 2016 13:44
by Hradschek
I agree with Squashman. There is no mistake in it.
Re: Writing Date and Time to a log file
Posted: 05 Apr 2016 07:50
by bmurtha
Thanks for the help,
I was writing to an AS/400 share, it was throwing the error because the file name was more than 8 characters.
Thanks again,
Regards,
Bryan