It’s sometimes useful to be able to change a file’s modification date. Linux makes it easy by simply using the “touch” command. I found this rather useful in cases where files were transferred between servers, which unfortunately do not have their times synchronized.
So, how can this be done on Windows?
Here is the command to issue in order to modify a single file’s modification time:
But in most cases, you’d be looking at mass-changing the modification date of files inside a certain directory. To do so, use the following command:
for %f in (c:\path\to\folder\*.*) do copy %f,,+
This would loop over all files containing a “dot” (i.e. extension) in c:\path\to\folder, and changes their modification time to the current system time. If for example you want the above to only go through XML files within that folder, then use *.xml instead of *.*
PS: the above command would work if you’re manually issuing it via the command prompt. However, if you’d like to embed that it in a batch file, make sure to replace %f with %%f. In other words, the command would turn into:
for %%f in (c:\path\to\folder\*.*) do copy %%f,,+
At one point in time, I wasn’t able to RDP into a windows host. Despite using the correct credentials, I was greeted with the following error: “Unable to obtain Terminal Server User Configuration”.
I had to physically access the machine and look into the Event Viewer for hints, but not much could be found there.
Next stop: services.msc — this showed that the “Workstation” service is stopped. Starting it up failed.
As a matter of fact, several services that depend on the aforementioned one failed to start (obviously).
Long story short, the following sorted out the issue, but I do not claim it’s a trick that would always work:
- I opened the registry editor (regedit.exe)
- Browsed to:
- lanmanworkstation (not lanmanserver)
- Deleted the following keys:
While this did the trick, manually interfering with service dependencies is not always a good diea.
Some of you may be missing the good old command-line telnet client. The thing is that vista has this client disabled by default. The good news is that you can easily install/enable it. To do so, follow these steps:
- Go to Control Panel
- Click on ‘Programs’
- Under ‘Programs and Features’, click on ‘Turn windows features on or off’
- Wait a bit for the list to be compiled
- Tick ‘Telnet client‘ and hit ‘OK’ then wait for it to be installed
You may now open a command prompt and use telnet hostname port
Is your Microsoft office manager taking way too much time to load?
The reason behind it is that the picture manager keeps track of the most recently used paths, and if any of these paths is no longer available, the software will stall for a long period.
The most possible scenario is that you have accessed a folder over the network, and you are no longer able to access that location.
The fix is rather simple.
On windows XP, go to c: -> documents and settings -> username (your login) -> local settings -> application data -> Microsoft -> OIS
Open the file ‘oiscatalog.cag’ with our favorite text editor (e.g. notepad) and delete any line pointing to a remote location.
You might as well delete that file, and it will be recreated upon starting the software again.
PS: if you’re on vista, the path to that file is C:\Users\yourusername\AppData\Local\Microsoft\OIS
Thought of mentioning this as I’ve came across it and noticed many others did too.
If for some reason, whenever you try enabling internet connection sharing (ICS), you get an error saying that the rpc server is unavailable, do the following:
- Click on start > run
- type services.msc and hit enter
- Search for the DHCP Client service, and check its status, it will most probably be stopped.
- Double click on this service, change its status to automatic and hit start