Archive for the ‘Microsoft’ Category

Mass changing files’ modification date on Windows

Friday, March 2nd, 2012

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:

copy filename,,+

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,,+

Enabling telnet in windows vista

Friday, November 6th, 2009

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:

  1. Go to Control Panel
  2. Click on ‘Programs’
  3. Under ‘Programs and Features’, click on ‘Turn windows features on or off’
  4. Wait a bit for the list to be compiled
  5. 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

Good luck

Microsoft Office Picture Manager takes a lot of time to load

Monday, March 3rd, 2008

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

RPC server unavailable error – Microsoft Internet Connection Sharing (ICS)

Wednesday, October 18th, 2006

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:

  1. Click on start > run
  2. type services.msc and hit enter
  3. Search for the DHCP Client service, and check its status, it will most probably be stopped.
  4. Double click on this service, change its status to automatic and hit start

that’s it.