1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WAD touch with reference file

Discussion in 'Support' started by nickles, Jan 28, 2014.

  1. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    touch doesn't seem to work correctly using /r{acw}. It always updates the target file's modification timestamp (w) instead of the specified one:

    A:2013/02/18,00:00:00 C:2012/10/08,14:05:31 W:2014/01/28,14:22:35 u.dif
    A:2010/10/10,14:00:54 C:2011/11/11,14:01:04 W:2012/12/12,14:05:31 update.exe
    --------------------------------------------------------------
    touch /raupdate.exe u.dif
    >> 28.01.2014 14:38:50,946 G:\Src\C\Update\u.dif

    A:2013/02/18,00:00:00 C:2012/10/08,14:05:31 W:2014/01/28,14:38:50 u.dif
    --------------------------------------------------------------
    touch /rcupdate.exe u.dif
    >> 28.01.2014 14:29:37,959 G:\Src\C\Update\u.dif

    A:2013/02/18,00:00:00 C:2012/10/08,14:05:31 W:2014/01/28,14:29:37 u.dif
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Sorry, but there must be a separator between the /ra and the reference file name, otherwise the syntax is ambiguous - for /rcabc.def you cannot tell whether the reference file is cabc.def using the modification timestamp, or abc.def with the creation timestamp.
     
  3. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Neither the help file nor the command line help show a space.
    Code:
    TOUCH [/A:[[-][+]rhsdaecjot] /C [/D[acw][date] /E /F /I"text" /N /O:[-]adegnrstu /Q /R[:acw]file /Sn /T[acw[u]][hh:mm[:ss]] file...
    Although, one could infer that adding a : (colon) between the /R and the a, c or w would remedy the situation.
     
    #3 JohnQSmith, Jan 28, 2014
    Last edited: Jan 28, 2014
  4. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    Yup, I overlooked that. Thanks, pals.
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Apparently when the command line option text was changed from courier new in version 7 to a proportional font in version 8 (yes, that far back) the separating space shrank to (nearly) invisible. However, in the example of the /R option it has always been clear. That's why my personal choice for even sample code is fixed pitch - but too much trouble in this forum when in the middle of a sentence, so even I shirk...
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    The colon is mandatory if you're specifying the a, c, or w option. The trailing space is highly recommended, but not essential.
     

Share This Page