Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file to find latest excel file created and open it in windows xp  (Read 2788 times)

0 Members and 1 Guest are viewing this topic.

xtranox

  • Guest
Hi,

I would like to have a batch code to automatically find the latest excel file created by a server inside this location D:\report\,  and automatically opens it from other PCs connected in the same LAN.  The filenames inside the D:\report starts with the date eg: 20090417*

The reason I need this help is because I do not want the user from the other PCs to use windows explorer and navigate to all other locations in the server harddrive.  They might do some damage if unintentionally deleted any of other files.  I am not allowed to change any file attribute in the server to make things hidden & etc.  Thanks in advance for your help.

Reno



    Hopeful
  • Thanked: 32
    do you share d:\report\ folder in the server?

    if yes then, the code is something like this:
    Code: [Select]
    @echo off
    for /f "tokens=*" %%a in ('dir/b/o-d/tc \\servername\sharename\*.xls 2^>nul') do (
    start "" %%a
    goto:eof
    )

    untested