[Clip] OT question
- Hey, folks,
I'm switching jobs and need to solve one little detail before I do.
I want to create a smart batch file which can create a directory name based
on the date of the following day.
Reason is that it will be run by a scheduler on a workstation on a given
day. It will copy a file from folder A on one server to folder B on another
server. Then it will copy a file from folder C on the first server to folder
A, overwriting the original file.
This takes place each Sunday. Folder C has the date for Monday as its name
as follows: 02_07_00.
I know how to use ASP/vbscript for this if it were a web application, but it
is not. This needs to be run by an auto-scheduler program in a Win98
environment. I anticipate using a DOS batch file but don't know how to have
it create a filename based on the date. Do any of you know how? Or is there
another solution you would suggest?
I'm wondering if NoteTab can be set up like a scheduler to respond to the
clock. I assume the clip lingo could easily create a new filename based on
the date (though I haven't looked at that yet). Can Notetab "listen" to the
clock and based on the event of "11:00.00 PM" for example go into action?
- Hi Michael,
> I want to create a smart batch file which can create a directory name basedFollowing day! You don't want much! :-)
> on the date of the following day.
I can get you part of the way.
Way back when... I used to run the FidoNet BATPOWER_UK echo.
I've trawled through my old files and dug up this... Don't forget it's UK based
so the format may not be quite as you'd like it.
Rudy was one of our most reliable contributors and, of course, it doesn't give
you the following day's date.
I'm afraid I haven't checked out exactly what the DEBUG script is doing, but if
you're into low level languages and with only a few bytes you should be able to
hack it. Maybe even do the necessary arithmetic to add the extra day!
(483) Tue 4 Jun 96 22:32
By: Rudy Lacchin
To: Vince Gillard
Re: Date Seperators?
On Friday May 31 1996, Vince Gillard wrote to All:-
VG> Can anyone suggest a way of creating a directory using the system
VG> date as the dir name ? I tried md a:\%_DATE% but the date
VG> separators are back slashes which causes probs.
Change the slashes to hyphens using EDLIN:-
echo set date=%%3>temp1.bat
dir temp1.bat | find "TEMP1 BAT" >temp2.bat
echo n temp.inp >temp.scr
echo e 0100 "1r/" 1a "-" d a "e" d a 1a >>temp.scr
echo rcx >>temp.scr
echo 000b >>temp.scr
echo w >>temp.scr
echo q >>temp.scr
debug <temp.scr >nul
edlin temp2.bat <temp.inp
It's a bit on the lengthy side, but it does the job - on my system, at
least! The date is stored in an evar called DATE and will be in the
format DD-MM-YY. Would YY-MM-DD be better?
--- GoldED/386 2.50+
* Origin: White Light (2:253/10)