The copy command supports merging multiple files into a single destination file. Since a blank destination cannot be specified using a space character at the command prompt, two commas can be used to denote that.
cygwin comes with touch. I know you mentioned that you don't want to install a whole framework, but cygwin is quite lightweight, and can be called from dos command window without the whole unix-like command line turned on.
This content can be saved to a reg file. This will add a right click context menu for all files with the "Touch File" ability (tested on Windows 7).Copy all the following lines to reg file. Run the file and approve the question.Right click on any file (or multiple files) - "Touch File" option is now available.
Funduc Software Touch is a free 'touch' utility that allows you to change the time/date &/or attribute stamps on one or more files. In addition, FS Touch can add/subtract a specified number of seconds from the existing file time. You can specify which file(s) and/or subdirectories to change via 'complex file masks'. The program can be run from interactively or the command line. New to version 7.2 is a command line switch to change file modified time stamp +/- the specified number of seconds.
If you are using git for one or more projects, the mingw based git-bash for Windows has the touch command.I want to thank @greg-hewgill for pointing out to me that 'nix utilities exist for windows, because it was that which put me on the idea to try touch in git-bash.
I appreciate this is an old question, I just discovered touch on my Windows 10 system. I downloaded and installed Git from here (I think) and it looks like touch and various other utilities are in the bin folder.
Funduc Software Touch is a 'touch' utility that allows you to change the time/date &/or attribute stamps on one or more files. In addition, FS Touch can add/subtract a specified number of seconds from the existing file time. You can specify which file(s) and/or subdirectories to change via 'complex file masks'. The program can be run from interactively or the command line. New to version 7.2 is a command line switch to change file modified time stamp +/- the specified number of seconds.
It is up to the user to know what files on either a local or network drive are safe
to modify!! For example, changing file dates on file(s) directly related to your operating system or the operating system of a network drive may cause problems for your computer. If you are not sure of what you are doing do not proceed!
Care should be taken when modifying files on multi-platter NAS RAID drive arrays. The program has no logic whatsoever to identify RAID drive priorities and has no special knowledge of vendor specific storage manager software or network drivers. If you have files you must modify on a NAS RAID array consider temporarily copying them to a local standalone drive, using FS Touch, and copying them back to the NAS device afterward.
Care is advised when using the program to modify file stamps on storage cards used in devices that expect might fixed file dates on 'system' related files (eg. cameras, music players, etc). Backup first when changing files on such media.
Funduc_Software_Touch-Freeware-x64.exe (3.5 MB) - Self-installing version for 64-bit Windows. See Install & Uninstall Information for guidance about installation and removal. Download this and run 'Funduc_Software_Touch-Freeware-x64.exe' to install.
Is there a windows equivalent of the 'touch' command from the linux / mac os / unix world ? Do I need to create these files by hand (and modify them to change the timestamp) in order to implement this sort of command? I am working with node and that doesn't seem very ... node-ish...
I'm surprised how many answers here are just wrong. Echoing nothing into a file will fill the file with something like ECHO is ON, and trying to echo $nul into a file will literally place $nul into the file. Additionally for PowerShell, echoing $null into a file won't actually make a 0kb file, but something encoded as UCS-2 LE BOM, which can get messy if you need to make sure your files don't have a byte-order mark.
After testing all the answers here and referencing some similar ones, I can guarantee these will work per console shell. Just change FileName.FileExtension to the full or relative-path of the file you want to touch; thanks to Keith Russell for the COPY NUL FILE.EXT update:
This will create a new file named whatever you placed instead of FileName.FileExtension with a size of 0 bytes. If the file already exists it will basically copy itself in-place to update the timestamp. I'd say this is more of a workaround than 1:1 functionality with touch but I don't know of any built-in tools for CMD that can accomplish updating a file's timestamp without changing any of its other content.
What this does is attempts to execute a program called $, but if $ does not exist (or is not an executable that produces output) then no output is produced by it. It is essentially a hack on the functionality, however you will get the following error message:
2>nul sends error-output (output 2) to nul (which ignores all input when written to). Obviously the second command (with 2>nul) is made redundant by the type command since it is quicker to type. But at least you now have the option and the knowledge.
For a very simple version of touch which would be mostly used to create a 0 byte file in the current directory, an alternative would be creating a touch.bat file and either adding it to the %Path% or copying it to the C:\Windows\System32 directory, like so:
The case for the Windows 10 touch screen: I don't have to make much of a case because the utility is obvious. It allows you to do touch-friendly things like scrolling, pinching and zooming (some prefer touch screens over trackpads for those actions), and the myriad things professionals and clerical workers find more efficient with a touch screen. Currently, I am using a couple new Windows laptops with touch screens. Problem is, I don't use the touch screen (anymore). I find it easier to keep my hands on the keyboard and use the capable (and large) track pads that now come on almost all Windows 10 laptops.
The case for the Apple Touch Bar: some reviews have gone so far to call it a gimmick. I disagree. Placing what is in effect a small OLED display on the keyboard works. I agree with Steve Jobs (2010) assertion that laptop users don't want to reach up and touch the screen.
Ditto. And that's coming from someone (me) that has the 12.9-inch iPad Pro with the Smart Keyboard. As much as I tried, that configuration has never worked well for me. It's too much of an ergonomic hassle to keep reaching up for the screen while I'm typing, keyboard shortcuts notwithstanding.
Let me give a couple of examples that make the Touch Bar irresistible for me (irresistible usually precedes indispensable). Open Safari (let's hope Google follows suit with Chrome) and all of your tabs appear on the Touch Bar. Even with 8 tabs open (crammed into the Touch Bar display), it's very practical to jump from tab to tab. And iTunes with the dynamic slider controls is a much better experience with the Touch Bar.
But in order for the Touch Bar to be a long-term success, third parties need to sign on (e.g., Google, Microsoft). Also, I would suggest (in the future) that Apple make the Touch Bar OLED bigger, i.e., taller. Right now, it's about half the height of a keyboard key. It should be at least the same height, in my opinion. Because it's so skinny, it can be tempting for some users to simply ignore it.
Winner: I'm going to be as fair as possible (despite my personal preference for the Touch Bar) and say, at the moment, for most laptop users the Windows 10 touch display is the winner. There are simply too many things you can do with a touch screen that you can't do with Apple's Touch Bar. But that assessment could change quickly. As Apple refines the Touch Bar, it has the potential to eclipse touch-screen laptops. Time will tell.
In computing, touch is a command used to update the access date and/or modification date of a computer file or directory. It is included in Unix and Unix-like operating systems, TSC's FLEX,[1] Digital Research/Novell DR DOS, the AROS shell,[2] the Microware OS-9 shell,[3] and ReactOS.[4]The command is also available for FreeDOS[5] and Microsoft Windows.[6]
In its default usage, it is the equivalent of creating or opening a file and saving it without any change to the file contents. touch avoids opening, saving, and closing the file. Instead it simply updates the dates associated with the file or directory. An updated access or modification date can be important for a variety of other programs such as backup utilities or the make command-line interface programming utility. Typically these types of programs are only concerned with files which have been created or modified after the program was last run. The touch command can also be useful for quickly creating files for programs or scripts that require a file with a specific name to exist for successful operation of the program, but do not require the file to have any specific content.
The Single Unix Specification (SUS) specifies that touch should change the access times, modification times, or both, for a file. The file is identified by a pathname supplied as a single argument. It also specifies that if the file identified does not exist, the file is created and the access and modification times are set as specified. If no new timestamps are specified, touch uses the current time.
A touch utility first appeared in Version 7 AT&T UNIX. Today, the command is available for a number of different operating systems, including many Unix and Unix-like systems, DOS, Microsoft Windows and the classic Mac OS.[which?]
The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.[8] The FreeDOS version was developed by Kris Heidenstrom and is licensed under the GPL.[9] DR DOS 6.0[10] and KolibriOS[11] include an implementation of the touch command. The .mw-parser-output .monospacedfont-family:monospace,monospacetouch command has also been ported to the IBM i operating system.[12]
c80f0f1006