• Post Reply Bookmark Topic Watch Topic
  • New Topic

Touch Command  RSS feed

 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a utility or a command on the Windows side that is equivalent to the touch command on the UNIX?
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could be wrong, but the only thing that comes to mind, that comes close to the Unix "touch" command is the Dos command "edit".
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
edit brings up an editor. What I'm looking to do is go through a list of files and update the modified date. This helps me force a compile on some jsp pages that have includes that have changed.
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
unless i'm mistaken, "edit" will save a file when asked to even though it hasn't been modified. that would update the timestamp by brute force - but you're right, it does sound a bit cumbersome.

i know that some Unix-like utilities have been ported to run on Windows in the past; there's even an entire Unix-like user environment for Windows (Cygwin) available. a quick google search found at least one project that might work out for you.
 
Tim Holloway
Saloon Keeper
Posts: 18799
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be a "touch" GNU utility. I used to have one for CP/M.

On MS-DOS, the Lattice C compiler came with a "touch" program, though I never saw one for MS Visual Studio.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
unxutils is a useful bundle of unix-tools for the win plattform.

http://gnuwin.epfl.ch/apps/unxutils/en/

They don't need cygwin, but comes as native exe-files.

'Edit' is an msdos-editor - much more usefull than notepad, but textmode only.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37507
552
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dale,
If you don't want to download a script, you can use Microsoft's suggestedapproach using the COPY command.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!