Search : in
By :

Batch script, file modification time updating

Last answer on Mar 11, 2009 9:18:02 am GMT sam, on Mar 10, 2009 9:55:29 am GMT 
 Report this message to moderators

Hello,

I'm basically looking for a helping hand in making a little batch script. What I need is for it to modify the file modification time of a given file (static) every five minutes and ONLY if the file exists. I would also like it to either run in the background and/or be invisible - i.e. no command window. That's it. The computer in question is running on Windows XP SP2 and the drive is a WD Passport if that matters.

If you're wondering why I need this, it's because the WD Passport is connected to my media center and it keeps falling asleep, which is a pain because I can't seem to wake it up remotely. The solution I have now is dependant on a second computer (my laptop) and a quick and dirty PHP script with crontab triggering it. I want something that can survive on it's own.

Thanks in advance!

Configuration: Mac OS X
Firefox 3.0.7

Windows XP SP2

Best answers for « Batch script, file modification time updating » in :
Cannot find script file [C:WINDOWSsowar.vbs] ShowCannot find script file "C:\WINDOWS\sowar.vbs" Issue Solution Issue Whenever I start my laptop I get: Cannot find script file "C:\WINDOWS\sowar.vbs". I think this is a virus. What should I do to resolve this one? Another thing,...
Hosts file or Lhost: update impossible ShowHosts file or Lhost: update impossible In the case you get the following error messages when trying to modify the Hosts file (or Lmhosts) in Microsoft Windows Vista from an administrator account: Access to...
Renaming multiple files in batch ShowRenaming multiple files in batch Native features Using a third-party program Renaming a large number of files can quickly become tedious. Fortunately, there are tools to automate this task in many cases: Native features On Windows...
Download Find Junk Files ShowThe most part of applications on Windows create temporary files on your hard disk during their functioning. These files are assumed be abolished and the space recovered during the closing of program, but it is not always case. In the course of time,...

1

caBassileM, on Mar 11, 2009 8:35:29 am GMT

Hi,
there are some softwares that can do the job for you.
try this link to see if they correspond to what you are searching for:
http://www.soft411.com/software/file-attribute.html

Reply to caBassileM

2

 sam, on Mar 11, 2009 9:18:02 am GMT
  • +1

Couldn't see anything immediately that would fit my needs.... and even if I did, it'd probably be a lot of overkill using a full flown GUI application. I just need something equivalent of:

<?php
if(file_exists('/Volumes/EEE-320GB/KEEPALIVE.txt')) {
@touch('/Volumes/EEE-320GB/KEEPALIVE.txt');
}
?>

and for it to happen every 5 minutes with no command window popping up.

Reply to sam