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
Search found 4 matches
- 05 Apr 2016 07:50
- Forum: DOS Batch Forum
- Topic: Writing Date and Time to a log file
- Replies: 3
- Views: 3859
- 04 Apr 2016 12:39
- Forum: DOS Batch Forum
- Topic: Writing Date and Time to a log file
- Replies: 3
- Views: 3859
Writing Date and Time to a log file
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
if exist D:\Test1\LOCK.TXT echo %DATE% %TIME% LOCKBOX.txt file found > LOCKBOX_LOG.txt
- 17 Nov 2015 15:28
- Forum: DOS Batch Forum
- Topic: simple redirect not working
- Replies: 2
- Views: 2401
Re: simple redirect not working
Thank you !
- 17 Nov 2015 14:19
- Forum: DOS Batch Forum
- Topic: simple redirect not working
- Replies: 2
- Views: 2401
simple redirect not working
I'm just trying to output a filename to a file along with an FTP command. The desired result is this:
cd prod
get ISP_POD_111715_001.txt
This is what I have:
set buildDate=%DATE:~4,10%
set dateStr=ISP_POD_%buildDate:~0,2%%buildDate:~3,2%%buildDate:~8,2%_001.txt
%dateStr% > test.txt
cd prod
get ISP_POD_111715_001.txt
This is what I have:
set buildDate=%DATE:~4,10%
set dateStr=ISP_POD_%buildDate:~0,2%%buildDate:~3,2%%buildDate:~8,2%_001.txt
%dateStr% > test.txt