How to copy file through bat-file only at appointed day of week?

  • Thread starter Thread starter Natalia
  • Start date Start date
N

Natalia

hello,
how can i copy text file through bat-script only one time a week, for
example at friday?
Thank you very much in advance.
 
Natalia said:
hello,
how can i copy text file through bat-script only one time a week, for
example at friday?
Thank you very much in advance.

You use the Windows Task Scheduler to launch the batch file at the required
time each Friday.
 
No, it isn't. You could also get a batch file to run all the time and check
the date and time once every minute. While this would work, it would be a
clunky and unreliable method. The Task Scheduler is the ideal tool for your
purpose.
 
thank you very much for your answer

Pegasus (MVP) said:
No, it isn't. You could also get a batch file to run all the time and check
the date and time once every minute. While this would work, it would be a
clunky and unreliable method. The Task Scheduler is the ideal tool for your
purpose.
 
i'm really sorry for asking your advice again but is it safe to use such a way:

for /f %%i in ('wmic path win32_LocalTime get DayOfWeek') do set wd=%%i
echo %wd%

thank you
 
The command "wmic path win32_LocalTime get DayOfWeek" doesn't work on my
machine. What do you expect it to generate? And what do you get when you
type this command at the Command Prompt:
echo %date%{Enter}
 
dear Pegasus, i really thank you for spending your time on my requests
echo %date%{Enter}
16.12.2008


when i start command
for /f %%i in ('wmic path win32_LocalTime get DayOfWeek') do set wd=%%i
echo %wd%

i see wd=2
(which means today is 2nd day of week)

thank you
 
You ask if it is safe to use this command. Yes, of course it is, and if it
works for you, great!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top