Jump to content

Recommended Posts

Posted

Hi,

In a logon script I am writing, I use the following line:

 

for %%a in (\\server\netlogon\shortcuts.zip) do set shorcuts_timestamp=%%~taa

 

It works in trying to get the timestamp of the shortcuts.zip folder. However, sometimes it takes a very long time e.g. 20seconds, when it is only checking the timestamp of 1 file. Any ideas if I am doing something wrong? Is it checking the whole netlogon folder or something?

 

Thanks!

Posted

Doesn't seem to make a difference I'm afraid, renamed it to .zip or even .txt and still can take time.

 

Interestingly, sometimes it is instant, sometimes it takes 20secs. This happened even when it was a .zip file.

 

Any ideas?

Posted
Just get the time stamp of the zip file, and stick it into a dos variable!

 

Shouldn't it be a single "a" then?

 

for %%a in (myfile.zip) do set timestamp=%%~ta

 

Steve

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • 47 When would you like EduGeek EDIT 2025 to be held?

    1. 1. Select a time period you can attend


      • I can make it in June\July
      • I can make it in August\Sept
      • Other time period. Comment below
      • Either time

×
×
  • Create New...