PC Review


Reply
Thread Tools Rate Thread

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

 
 
Natalia
Guest
Posts: n/a
 
      15th Dec 2008
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.
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      15th Dec 2008

"Natalia" <(E-Mail Removed)> wrote in message
news:386C7649-FAC6-41FE-B550-(E-Mail Removed)...
> 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.


 
Reply With Quote
 
Natalia
Guest
Posts: n/a
 
      15th Dec 2008
Thank you very much for your answer. Is it only way to do this?

"Pegasus (MVP)" wrote:

>
> "Natalia" <(E-Mail Removed)> wrote in message
> news:386C7649-FAC6-41FE-B550-(E-Mail Removed)...
> > 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.
>
>
>

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      15th Dec 2008
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.


"Natalia" <(E-Mail Removed)> wrote in message
news:6DA62741-90C3-4039-A884-(E-Mail Removed)...
> Thank you very much for your answer. Is it only way to do this?
>
> "Pegasus (MVP)" wrote:
>
>>
>> "Natalia" <(E-Mail Removed)> wrote in message
>> news:386C7649-FAC6-41FE-B550-(E-Mail Removed)...
>> > 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.
>>
>>
>>



 
Reply With Quote
 
Natalia
Guest
Posts: n/a
 
      15th Dec 2008
thank you very much for your answer

"Pegasus (MVP)" wrote:

> 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.
>
>
> "Natalia" <(E-Mail Removed)> wrote in message
> news:6DA62741-90C3-4039-A884-(E-Mail Removed)...
> > Thank you very much for your answer. Is it only way to do this?
> >
> > "Pegasus (MVP)" wrote:
> >
> >>
> >> "Natalia" <(E-Mail Removed)> wrote in message
> >> news:386C7649-FAC6-41FE-B550-(E-Mail Removed)...
> >> > 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.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      15th Dec 2008

"Natalia" <(E-Mail Removed)> wrote in message
news:7432A164-2487-4336-A70D-(E-Mail Removed)...
> thank you very much for your answer
>


You're welcome.


 
Reply With Quote
 
Natalia
Guest
Posts: n/a
 
      16th Dec 2008
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

"Pegasus (MVP)" wrote:

>
> "Natalia" <(E-Mail Removed)> wrote in message
> news:7432A164-2487-4336-A70D-(E-Mail Removed)...
> > thank you very much for your answer
> >

>
> You're welcome.
>
>
>

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      16th Dec 2008
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}


"Natalia" <(E-Mail Removed)> wrote in message
news:A7CC44E1-7BEE-41DA-9F25-(E-Mail Removed)...
> 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
>
> "Pegasus (MVP)" wrote:
>
>>
>> "Natalia" <(E-Mail Removed)> wrote in message
>> news:7432A164-2487-4336-A70D-(E-Mail Removed)...
>> > thank you very much for your answer
>> >

>>
>> You're welcome.
>>
>>
>>



 
Reply With Quote
 
Natalia
Guest
Posts: n/a
 
      16th Dec 2008
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


"Pegasus (MVP)" wrote:

> 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}
>
>
> "Natalia" <(E-Mail Removed)> wrote in message
> news:A7CC44E1-7BEE-41DA-9F25-(E-Mail Removed)...
> > 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
> >
> > "Pegasus (MVP)" wrote:
> >
> >>
> >> "Natalia" <(E-Mail Removed)> wrote in message
> >> news:7432A164-2487-4336-A70D-(E-Mail Removed)...
> >> > thank you very much for your answer
> >> >
> >>
> >> You're welcome.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      16th Dec 2008
You ask if it is safe to use this command. Yes, of course it is, and if it
works for you, great!


"Natalia" <(E-Mail Removed)> wrote in message
news:13E3EB70-9187-4DA9-A437-(E-Mail Removed)...
> 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
>
>
> "Pegasus (MVP)" wrote:
>
>> 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}
>>
>>
>> "Natalia" <(E-Mail Removed)> wrote in message
>> news:A7CC44E1-7BEE-41DA-9F25-(E-Mail Removed)...
>> > 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
>> >
>> > "Pegasus (MVP)" wrote:
>> >
>> >>
>> >> "Natalia" <(E-Mail Removed)> wrote in message
>> >> news:7432A164-2487-4336-A70D-(E-Mail Removed)...
>> >> > thank you very much for your answer
>> >> >
>> >>
>> >> You're welcome.
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WinVista file copy network timeout to WinXP for file Outlook.pst 2007 Sharpy Microsoft Outlook Discussion 4 29th Apr 2009 06:37 AM
Cant copy or zip a file - File not found or no read permissions" error Jack B. Pollack Windows XP General 2 15th Nov 2008 01:29 PM
Copy from closed excel file and paste to master file then loop for same siles Steve B Microsoft Excel Programming 2 6th Mar 2007 06:36 AM
How do i copy a file from an embedded file to the file system James L Microsoft Dot NET Compact Framework 0 25th Apr 2005 09:24 PM
File.Move vs (File.Copy and File.Delete) Chris Microsoft VB .NET 1 9th May 2004 07:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:25 AM.