• Re: Name a file today's date

    From Bill Gordon@VERT to Bill McGarrity on Friday, September 18, 2015 18:43:53
    Good luck!!


    Thanks, I'll try.
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Bill Gordon on Saturday, September 19, 2015 00:17:14
    Good luck!!


    Thanks, I'll try.
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net

    I can't seem to find the rest of this thread... but if you are talking about Windows Batch, you could try this. I found it somewhere on the net and make good use of it.

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)

    Call it as:
    %mydate%

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Bill Gordon@VERT to KenDB3 on Saturday, September 19, 2015 09:17:14
    I can't seem to find the rest of this thread... but if you are talking about Windows Batch, you could try this. I found it somewhere on the net and make good use of it.

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)

    Call it as:
    %mydate%

    You are right, it was in another echo-but the problem still remains. I'm not
    a programmer, and I have no idea how to use it. Thanks for this, but sorry, I don't know what to do with it.
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From mark lewis@VERT to Bill Gordon on Saturday, September 19, 2015 11:37:04
    19 Sep 15 09:17, you wrote to KenDB3:

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set
    mydate=%%c-%%a-%%b)

    Call it as:
    %mydate%

    You are right, it was in another echo-but the problem still remains. I'm not a programmer, and I have no idea how to use it. Thanks for this, but sorry, I don't know what to do with it.

    you smiply place it near the top of your .bat file so that it is executed before you need the date value... then when you need the date value, you use %mydate% in that place...

    eg: ren sbbs.log sbbs-%mydate%.log

    )\/(ark

    ... I'll have two brains on drugs, scrambled with sausage, grits, toast and coff
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mro@VERT/BBSESINF to mark lewis on Saturday, September 19, 2015 17:18:42
    Re: Name a file today's date
    By: mark lewis to Bill Gordon on Sat Sep 19 2015 11:37 am


    you smiply place it near the top of your .bat file so that it is executed before you need the date value... then when you need the date value, you
    use %mydate% in that place...

    eg: ren sbbs.log sbbs-%mydate%.log


    on my windows computers i do backups with a date environment variable.
    i used to use setenv, but now i just go into the control panel and change my date form at from ##/##/## to ##-##-##
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Bill Gordon@VERT to mark lewis on Saturday, September 19, 2015 18:16:52
    you smiply place it near the top of your .bat file so that it is executed before you need the date value... then when you need the date value, you use %mydate% in that place...

    eg: ren sbbs.log sbbs-%mydate%.log


    Outstanding!!! Now, how do I make it into the format 'yymmdd' ? Everything I try to do to change the original statement screws it up.

    Thanks
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Bill Gordon on Sunday, September 20, 2015 09:01:30
    you smiply place it near the top of your .bat file so that it is executed before you need the date value... then when you need the date value, you use %mydate% in that place...

    eg: ren sbbs.log sbbs-%mydate%.log


    Outstanding!!! Now, how do I make it into the format 'yymmdd' ? Everything I try to do to change the original statement screws it up.

    Thanks

    Hmmm... I'm totally guilty of using some code I can't possibly augment. However, my google-fu is strong, lol. Maybe check out this link:

    http://stackoverflow.com/questions/19993537/windows-batch-how-to-append-the-cur rent-date-and-time-of-a-format-yyyymmdd-hhm

    Stack Overflow has a lot of good solutions to problems like this.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From mark lewis@VERT to Bill Gordon on Sunday, September 20, 2015 11:48:10
    19 Sep 15 18:16, you wrote to me:

    you smiply place it near the top of your .bat file so that it is
    executed before you need the date value... then when you need the date
    value, you use %mydate% in that place...

    eg: ren sbbs.log sbbs-%mydate%.log

    Outstanding!!! Now, how do I make it into the format 'yymmdd' ?
    Everything I try to do to change the original statement screws it up.

    it is year-month-day isn't it??

    do not want the dashes? try this...

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)

    )\/(ark

    ... The difference between spoiled milk & yogurt? Marketing!
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Bill Gordon@VERT to mark lewis on Sunday, September 20, 2015 14:36:36
    do not want the dashes? try this...

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)

    )\/(ark


    Thanks, Mark, I now have a batch file built to rename ALL my log files and store them in their respective directories.
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mro@VERT/BBSESINF to Bill Gordon on Sunday, September 20, 2015 18:55:04
    Re: Re: Name a file today's date
    By: Bill Gordon to mark lewis on Sun Sep 20 2015 02:36 pm

    do not want the dashes? try this...

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)

    )\/(ark


    Thanks, Mark, I now have a batch file built to rename ALL my log files and store them in their respective directories.


    that's what i do with synchronet logs. gets real messy
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From KenDB3@VERT/KD3NET to Bill Gordon on Sunday, September 20, 2015 23:35:16
    do not want the dashes? try this...

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)

    )\/(ark


    Thanks, Mark, I now have a batch file built to rename ALL my log files and store them in their respective directories.

    Ah, that was easy, I thought you needed to change it to a 2 character year instead of 4 (15 vs 2015).

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Poindexter Fortran@VERT/REALITY to Bill Gordon on Sunday, September 20, 2015 20:25:00
    Bill Gordon wrote to mark lewis <=-


    Outstanding!!! Now, how do I make it into the format 'yymmdd' ?
    Everything I try to do to change the original statement screws it up.



    Here's my cod, it sets an environmental variable backupdate to YYMMDD:

    SET backupdate=%date:~-4,4%%date:~-10,2%%date:~-7,2%


    ... Display your talent
    --- MultiMail/Win32 v0.49
    þ Synchronet þ realitycheckBBS -- http://realitycheckBBS.org
  • From Bill Gordon@VERT to mark lewis on Monday, September 21, 2015 09:01:21
    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)


    If I can be a pest ONE LAST TIME, how do I it to display the time as well?

    Last one, I promise.

    Thanks
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Bill Gordon@VERT to Bill McGarrity on Monday, September 21, 2015 09:14:40
    This is a batch file I use to do a full backup sbbs

    @echo off
    SET backupdate=%date:~-4,4%%date:~-10,2%%date:~-7,2%
    SET target=G

    echo Performing Backup for %backupdate%:

    mkdir %target%:\Backups\%backupdate%
    xcopy c:\sbbs\*.* %target%:\Backups\%backupdate%\ /s /e /c /y


    That would be a great backup, but when I ran it, it froze when it got to c:\sbbs\data\mail.shd.

    It would NOT continue, and I waited about 10 minutes before I hit the CTRL-C. --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From mark lewis@VERT to Bill Gordon on Monday, September 21, 2015 10:59:58
    20 Sep 15 14:36, you wrote to me:

    do not want the dashes? try this...

    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set
    mydate=%%c%%a%%b)

    Thanks, Mark, I now have a batch file built to rename ALL my log files and store them in their respective directories.

    excellent... did/do you see the only difference between the original and this one?

    )\/(ark

    ... Newest Psycho-Babble Disease: Enthusiasm Surplus Disorder.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From mark lewis@VERT to Bill Gordon on Monday, September 21, 2015 11:00:36
    21 Sep 15 09:01, you wrote to me:


    For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set
    mydate=%%c%%a%%b)

    If I can be a pest ONE LAST TIME, how do I it to display the time as
    well?

    hahaha... i was waiting for that :)

    this is another one, very similar to the above... it gets stored in another %var%...

    For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)

    use it as

    echo %mytime%


    if you prefer military format, use this instead...

    For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)

    and use it the same way...


    one should also note that the original date one is region based... in other words, if a region uses a different output order for the date, then the one posted will be wrong for their region... if one wants to work in a region independent way and then build their own output, then one should use a much different but very similar method which outputs in ISO format and then we can build our desired string from there...


    for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j

    set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%

    echo Local date is [%ldt%]


    the first line will be wordwrapped due to length... it grabs the date from the "wmic os" command and stores it in the "ldt" variable in ISO format... the second line uses substring processing to break the contents of the ldt variable
    apart and store them back into the ldt variable when finished...

    1. start at the 0th place and extract the next 4 characters
    2. go to the 4th place and extract the next 2 characters
    3. go to the 6th place and extract the next 2 characters
    4. add a space
    5. go to the 8th place and extract the next 2 characters
    6. add a ':'
    7. go to the 10th place and extract the next 2 characters
    8. add a ':'
    9. go to the 12th place and extract the next 6 characters

    the third line demonstrates the output which looks like

    Local date is [2015-09-21 11:15:53.048]


    now that we have this, we can do pretty much anything we want with the time and
    date... the only things that we might want to adjust are the characters grabbed
    and or characters added to the strings... if we want the date and time in YYYYMMDD_hhmm format then we would alter the second line like so...

    set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%_%ldt:~8,2%%ldt:~10,2%

    note that i replaced the ' ' with '_' and chopped off the last section at the ':' that grabbed the seconds and hundredths of seconds... that should give us something like

    20150921_1120

    for 11:20AM or

    20150921_1843

    for 6:43PM in the ldt variable which we then use like

    echo %ldt%

    or

    ren sbbs.log sbbs-%ldt%.log


    BTW: i do actually use the above on another machine with no '_' between the time and date and i regularly send link test messages with the subject of the date and time and no message body to test how long a message takes to arrive and be responded to ;)

    BTW2: these have all been taken from this site...

    http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-suitable-format-for-us

    http://tinyurl.com/mzheefs

    Last one, I promise.

    :)

    )\/(ark

    ... 80. The opposite sex likes people who shower.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Poindexter Fortran@VERT/REALITY to Bill Gordon on Monday, September 21, 2015 12:08:23
    Re: Re: Name a file today's date
    By: Bill Gordon to Bill McGarrity on Mon Sep 21 2015 09:14 am

    That would be a great backup, but when I ran it, it froze when it got to c:\sbbs\data\mail.shd.


    Weird -- I run it as an exclusive event, and also kick it off outside of Synchronet and it works here. What OS?

    ---
    þ Synchronet þ realitycheckBBS -- http://realitycheckBBS.org
  • From Bill Gordon@VERT to mark lewis on Monday, September 21, 2015 15:29:52
    hahaha... i was waiting for that :)

    nope, I promised: last one

    thanks
    --- SBBSecho 2.27-Win32
    * Origin: *Square One BBS - the place to begin (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Bill McGarrity@VERT to Bill Gordon on Monday, September 21, 2015 19:17:00
    Bill Gordon wrote to Bill McGarrity <=-

    This is a batch file I use to do a full backup sbbs

    @echo off
    SET backupdate=%date:~-4,4%%date:~-10,2%%date:~-7,2%
    SET target=G

    echo Performing Backup for %backupdate%:

    mkdir %target%:\Backups\%backupdate%
    xcopy c:\sbbs\*.* %target%:\Backups\%backupdate%\ /s /e /c /y


    That would be a great backup, but when I ran it, it froze when it got
    to c:\sbbs\data\mail.shd.

    It would NOT continue, and I waited about 10 minutes before I hit the CTRL-C.

    I don't see where I use mail.shd anywhere? Why would you put that into a sub?


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    === MultiMail/Win32 v0.50
    --- SBBSecho 2.27-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to Bill McGarrity on Monday, September 21, 2015 17:34:16
    Re: Re: Name a file today's date
    By: Bill McGarrity to Bill Gordon on Mon Sep 21 2015 07:17 pm

    Bill Gordon wrote to Bill McGarrity <=-

    This is a batch file I use to do a full backup sbbs

    @echo off
    SET backupdate=%date:~-4,4%%date:~-10,2%%date:~-7,2%
    SET target=G

    echo Performing Backup for %backupdate%:

    mkdir %target%:\Backups\%backupdate%
    xcopy c:\sbbs\*.* %target%:\Backups\%backupdate%\ /s /e /c /y


    That would be a great backup, but when I ran it, it froze when it got to c:\sbbs\data\mail.shd.

    It would NOT continue, and I waited about 10 minutes before I hit the CTRL-C.

    I don't see where I use mail.shd anywhere? Why would you put that into a sub?

    "data/mail.shd" contains all the header data for all email in the Synchronet system.

    digital man

    Synchronet "Real Fact" #56:
    Synchronet introduced Telnet, FTP, SMTP and POP3 support w/v3.00a-Win32 in 2000.
    Norco, CA WX: 78.8øF, 59.0% humidity, 5 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From KenDB3@VERT/KD3NET to Bill Gordon on Monday, September 21, 2015 21:41:26
    Re: Re: Name a file today's date
    By: Digital Man to Bill McGarrity on Mon Sep 21 2015 05:34 pm

    Bill Gordon wrote to Bill McGarrity <=-

    This is a batch file I use to do a full backup sbbs

    @echo off
    SET backupdate=%date:~-4,4%%date:~-10,2%%date:~-7,2%
    SET target=G

    echo Performing Backup for %backupdate%:

    mkdir %target%:\Backups\%backupdate%
    xcopy c:\sbbs\*.* %target%:\Backups\%backupdate%\ /s /e /c /y


    That would be a great backup, but when I ran it, it froze when it
    got to c:\sbbs\data\mail.shd.

    It would NOT continue, and I waited about 10 minutes before I hit
    the CTRL-C.

    I don't see where I use mail.shd anywhere? Why would you put that into
    a sub?

    "data/mail.shd" contains all the header data for all email in the Synchronet system.

    You might want to try shutting down the various Synchronet applications that are running. I have my script doing this first:
    <begin code snippet>

    REM Shut down sbbsctrl.exe and scfg.exe
    taskkill /IM scfg.exe /t /f
    taskkill /IM sbbsctrl.exe /t /f

    <end code snippet>

    Then I actually stall purposely for a bit, run the backup, and then start applications back up.

    <begin code snippet>

    REM wait for a bit to make sure all is well
    ECHO. Stalling with a Ping....
    PING 1.1.1.1 -n 1 -w 10000 > NUL

    REM copy sbbs to sbbsback incrementally and create or append to a log
    ECHO. Copying Files Over....
    xcopy "C:\sbbs\*.*" c:\sbbsback\sbbs\ /c /s /r /d /y /i > C:\sbbsback\xcopy.log ECHO. Copying is Done

    REM Start sbbs back up and leave out scfg
    ECHO. Launching Programs....
    start "sbbsctrl Restart" /DC:\sbbs\exec\ "sbbsctrl.exe"
    ECHO. SBBSCTRL is Back Up

    <end code snippet>

    I also use 7zip command line to create an archive. That is where I use the date format.

    <begin code snippet>

    REM get a date format in yyyyddmm
    For /f "tokens=2-4 delims=/ " %a in ('date /t') do (set mydate=%c-%a-%b)

    REM zip it up with 7zip and omit the log
    ECHO. Turning backup files into 7zip archive....
    START "7zip Archive" /wait 7za a -mx=9 -y c:\sbbsback\zips\sbbs_backup_%mydate%.7z c:\sbbsback\sbbs
    ECHO. Archive Created!

    <end code snippet>

    I also stopped using XCOPY and started using ROBOCOPY. But there are some quirks with WinXP (which is what I run). Let me know if you would like my ROBOCOPY command info, more than happy to share :-)

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Bill Gordon@VERT to Bill McGarrity on Monday, September 21, 2015 21:47:50
    >
    I don't see where I use mail.shd anywhere? Why would you put that into a sub?


    I didn't. Evidently SBBS did for some reason. I've not given up on it yet, I gotta look it over from EVERY angle. Who knows, I might find a solution and never know exactly the solution. That's called SAL! (stupid-assed luck)

    Thanks
    --- SBBSecho 2.27-Win32
    * Origin: * Origin: *Square One BBS-sq1bbs.com (1:3634/22)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Poindexter Fortran@VERT/REALITY to KenDB3 on Tuesday, September 22, 2015 06:33:32
    Re: Re: Name a file today's date
    By: KenDB3 to Bill Gordon on Mon Sep 21 2015 09:41 pm

    REM wait for a bit to make sure all is well
    ECHO. Stalling with a Ping....
    PING 1.1.1.1 -n 1 -w 10000 > NUL

    That's a great idea -- I always used one of those little sleep executables, but having something that's already in the OS is even better. Less dependencies.

    ---
    þ Synchronet þ realitycheckBBS -- http://realitycheckBBS.org
  • From Bill McGarrity@VERT to Digital Man on Tuesday, September 22, 2015 11:42:00
    Digital Man wrote to Bill McGarrity <=-

    Re: Re: Name a file today's date
    By: Bill McGarrity to Bill Gordon on Mon Sep 21 2015 07:17 pm

    Bill Gordon wrote to Bill McGarrity <=-

    This is a batch file I use to do a full backup sbbs

    @echo off
    SET backupdate=%date:~-4,4%%date:~-10,2%%date:~-7,2%
    SET target=G

    echo Performing Backup for %backupdate%:

    mkdir %target%:\Backups\%backupdate%
    xcopy c:\sbbs\*.* %target%:\Backups\%backupdate%\ /s /e /c /y


    That would be a great backup, but when I ran it, it froze when it got to c:\sbbs\data\mail.shd.

    It would NOT continue, and I waited about 10 minutes before I hit the CTRL-C.

    I don't see where I use mail.shd anywhere? Why would you put that into a sub?

    "data/mail.shd" contains all the header data for all email in the Synchronet system.

    I understand that but he was asking for a way to date his log files and had nothing to do with mail.shd. If he wanted to backup the shd he should have mentioned something initially.


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    === MultiMail/Win32 v0.50
    --- SBBSecho 2.27-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Bill McGarrity@VERT to Bill Gordon on Tuesday, September 22, 2015 11:44:00
    Bill Gordon wrote to Bill McGarrity <=-

    >
    I don't see where I use mail.shd anywhere? Why would you put that into a sub?


    I didn't. Evidently SBBS did for some reason. I've not given up on it yet, I gotta look it over from EVERY angle. Who knows, I might find a solution and never know exactly the solution. That's called SAL! (stupid-assed luck)

    Why don't you post the actual batch file you're using so we can see where mail.shd is entering into the equation.


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    === MultiMail/Win32 v0.50
    --- SBBSecho 2.27-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From mark lewis@VERT to KenDB3 on Tuesday, September 22, 2015 13:29:50
    21 Sep 15 21:41, you wrote to Bill Gordon:

    <begin code snippet>

    REM wait for a bit to make sure all is well
    ECHO. Stalling with a Ping....
    PING 1.1.1.1 -n 1 -w 10000 > NUL

    you don't have a "wait" "sleep" or "delay" command that you can

    sleep 30

    or such with? that would be much better than pinging a public address...

    FWIW: whois 1.1.1.1

    % [whois.apnic.net]
    % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html

    % Information related to '1.1.1.0 - 1.1.1.255'

    inetnum: 1.1.1.0 - 1.1.1.255
    netname: APNIC-LABS
    descr: Research prefix for APNIC Labs
    descr: APNIC
    country: AU
    admin-c: AR302-AP
    tech-c: AR302-AP
    mnt-by: APNIC-HM
    mnt-routes: MAINT-AU-APNIC-GM85-AP
    mnt-irt: IRT-APNICRANDNET-AU
    status: ASSIGNED PORTABLE
    changed: hm-changed@apnic.net 20140507
    changed: hm-changed@apnic.net 20140512
    source: APNIC

    irt: IRT-APNICRANDNET-AU
    address: PO Box 3646
    address: South Brisbane, QLD 4101
    address: Australia
    e-mail: abuse@apnic.net
    abuse-mailbox: abuse@apnic.net
    admin-c: AR302-AP
    tech-c: AR302-AP
    auth: # Filtered
    mnt-by: MAINT-AU-APNIC-GM85-AP
    changed: hm-changed@apnic.net 20110922
    source: APNIC

    role: APNIC RESEARCH
    address: PO Box 3646
    address: South Brisbane, QLD 4101
    address: Australia
    country: AU
    phone: +61-7-3858-3188
    fax-no: +61-7-3858-3199
    e-mail: research@apnic.net
    remarks: ++++++++++++++++++
    remarks: + Address blocks listed with this contact
    remarks: + are withheld from general use and are
    remarks: + only routed briefly for passive testing.
    remarks: +
    remarks: + If you are receiving unwanted traffic
    remarks: + it is almost certainly spoofed source
    remarks: + or hijacked address usage.
    remarks: +
    remarks: + http://en.wikipedia.org/wiki/IP_address_spoofing
    remarks: + http://en.wikipedia.org/wiki/Regional_internet_registry remarks: +
    remarks: ++++++++++++++++++
    nic-hdl: AR302-AP
    tech-c: AH256-AP
    admin-c: AH256-AP
    mnt-by: MAINT-APNIC-AP
    changed: hm-changed@apnic.net 20110822
    source: APNIC

    % This query was served by the APNIC Whois Service version 1.69.1-APNICv1r0 (UNDEFINED)

    )\/(ark

    ... The times change and we change with them.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mro@VERT/BBSESINF to Poindexter Fortran on Tuesday, September 22, 2015 16:30:50
    Re: Re: Name a file today's date
    By: Poindexter Fortran to KenDB3 on Tue Sep 22 2015 06:33 am

    Re: Re: Name a file today's date
    By: KenDB3 to Bill Gordon on Mon Sep 21 2015 09:41 pm

    REM wait for a bit to make sure all is well
    ECHO. Stalling with a Ping....
    PING 1.1.1.1 -n 1 -w 10000 > NUL

    That's a great idea -- I always used one of those little sleep executables, but having something that's already in the OS is even better. Less dependencies.


    i think most oses have a sleep or a wait type program.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From KenDB3@VERT/KD3NET to Poindexter Fortran on Tuesday, September 22, 2015 23:22:09
    Re: Re: Name a file today's date
    By: Poindexter Fortran to KenDB3 on Tue Sep 22 2015 06:33 am

    REM wait for a bit to make sure all is well
    ECHO. Stalling with a Ping....
    PING 1.1.1.1 -n 1 -w 10000 > NUL

    That's a great idea -- I always used one of those little sleep executables, but having something that's already in the OS is even better. Less dependencies.

    Thanks, but I can't take credit for it. I am not sure, but I think I got it from this site:
    http://www.wikihow.com/Delay-a-Batch-File

    I use the Ping trick because WinXP won't recognize TIMEOUT command.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From KenDB3@VERT/KD3NET to mark lewis on Tuesday, September 22, 2015 23:34:56
    Re: Name a file today's date
    By: mark lewis to KenDB3 on Tue Sep 22 2015 01:29 pm

    <begin code snippet>

    REM wait for a bit to make sure all is well
    ECHO. Stalling with a Ping....
    PING 1.1.1.1 -n 1 -w 10000 > NUL

    you don't have a "wait" "sleep" or "delay" command that you can

    sleep 30

    or such with? that would be much better than pinging a public address...

    That option totally exists, but it is OS dependent. So, I am using WinXP, and I cannot get the TIMEOUT command to work. I think it works in Windows Vista on up.
    Check out:
    https://technet.microsoft.com/en-us/library/cc754891.aspx

    Which mentions it works in XP, but certainly not for me. I get this --> 'timeout' is not recognized as an internal or external command,
    operable program or batch file.

    FWIW: whois 1.1.1.1

    % [whois.apnic.net]
    % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html

    % Information related to '1.1.1.0 - 1.1.1.255'

    inetnum: 1.1.1.0 - 1.1.1.255
    netname: APNIC-LABS
    descr: Research prefix for APNIC Labs
    descr: APNIC
    country: AU
    admin-c: AR302-AP
    tech-c: AR302-AP
    mnt-by: APNIC-HM
    mnt-routes: MAINT-AU-APNIC-GM85-AP
    mnt-irt: IRT-APNICRANDNET-AU
    status: ASSIGNED PORTABLE
    changed: hm-changed@apnic.net 20140507
    changed: hm-changed@apnic.net 20140512
    source: APNIC

    irt: IRT-APNICRANDNET-AU
    address: PO Box 3646
    address: South Brisbane, QLD 4101
    address: Australia
    e-mail: abuse@apnic.net
    abuse-mailbox: abuse@apnic.net
    admin-c: AR302-AP
    tech-c: AR302-AP
    auth: # Filtered
    mnt-by: MAINT-AU-APNIC-GM85-AP
    changed: hm-changed@apnic.net 20110922
    source: APNIC

    role: APNIC RESEARCH
    address: PO Box 3646
    address: South Brisbane, QLD 4101
    address: Australia
    country: AU
    phone: +61-7-3858-3188
    fax-no: +61-7-3858-3199
    e-mail: research@apnic.net
    remarks: ++++++++++++++++++
    remarks: + Address blocks listed with this contact
    remarks: + are withheld from general use and are
    remarks: + only routed briefly for passive testing.
    remarks: +
    remarks: + If you are receiving unwanted traffic
    remarks: + it is almost certainly spoofed source
    remarks: + or hijacked address usage.
    remarks: +
    remarks: + http://en.wikipedia.org/wiki/IP_address_spoofing
    remarks: + http://en.wikipedia.org/wiki/Regional_internet_registry remarks: +
    remarks: ++++++++++++++++++
    nic-hdl: AR302-AP
    tech-c: AH256-AP
    admin-c: AH256-AP
    mnt-by: MAINT-APNIC-AP
    changed: hm-changed@apnic.net 20110822
    source: APNIC

    % This query was served by the APNIC Whois Service version 1.69.1-APNICv1r0 (UNDEFINED)

    I am not positive, but I more than likely grabbed this as an alternate method of stalling a batch file from here:
    http://www.wikihow.com/Delay-a-Batch-File

    It is a pretty good solution when the TIMEOUT option is not available. The ping stalls pretty well specifically because 1.1.1.1 is a real IP, but it is not (usually) on the net and routed (due to it being reserved for testing).

    However, I do remember seeing some web site that suggested pinging your own loopback (127.0.0.1) instead, if that makes it a bit less sketchy for you.

    ~KenDB3

    ---
    þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us
  • From Poindexter Fortran@VERT/REALITY to KenDB3 on Wednesday, September 23, 2015 06:00:03
    Re: Name a file today's date
    By: KenDB3 to mark lewis on Tue Sep 22 2015 11:34 pm

    However, I do remember seeing some web site that suggested pinging your own loopback (127.0.0.1) instead, if that makes it a bit less sketchy for you.

    Or you could ping your own gateway...

    ---
    þ Synchronet þ realitycheckBBS -- http://realitycheckBBS.org