I'm trying to run a batch script using Robocopy but when I try to put in MinAge days of 10 years ago (for example 3653 days) it doesn't like it and I'm getting an 'Invalid switch' error. If I put in the date 20110101 it works perfectly. Just trying to figure out the maximum number of days I can use for the MinAge parameter.
I've looked on Microsoft support, here an elsewhere and I don't see this being addressed. Thank you in advance for your time and answers.
1899 is the maximum days you can put in for MinAge.
Related
I'm trying to set my 'MaxIdleTime' in the Registry Editor. I have used the following link to set it up to be 5 Days. How can I make it 14 days? I want it longer than 5 days, but less the 'Never' I'm not sure how to convert seconds into Hexadecimal or Decimal value. Any help would be awesome!
https://www.sevenforums.com/tutorials/118889-remote-desktop-set-time-limit-idle-sessions.html
Thanks,
I found out it was in milliseconds. I just converted the days I wanted into milliseconds and went from there
In my office they every day double click on the program vsubst to assign a partition of the space on the computer as a drive. I want to make a batch file out of it so they do not have to do this every day. It takes 5 seconds, but 5 people times 5 seconds times 250 working days is 6250 seconds a year!
Can anyone help me out here? This shouldnt be to difficult. I run a windows machine and could put it in the windows task manager.
I guess its something like: Start ....vsubst.exe param param1
Ok. Trial and error got me there. Fill the following line in and place the batch file in your startup programs and you're done :D
start path\VSubst.exe NEWDRIVE FOLDERPATH
exit
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have been tasked with building a simple Ruby app that does two things:
Registers new users with a New command
Shows their time difference with Work command
It would be for an office building and the purpose would be to keep track of total hours worked.
I am also supposed to pull this information from a .txt file like so:
New Aaron
New Bertha
New Charles
Work Bertha 06:30 11:12
Work Bertha 12:03 16:17
Work Charles 07:52 17:02
With the time expressed in only minutes and hours. I don't think anyone would be working past midnight. This is the part that really confuses me, as I am having a lot of trouble trying to find the difference in their times for work, as shown in an expected output .txt file:
Aaron: 0 hours 0 minutes
Bertha: 8 hours 52 minutes
Charles: 9 hours 10 minutes
Once again, I am ONLY asking for help with finding the difference in each individual's time for work.
Any and all help would be appreciated.
I'd suggest looking into IO#readlines for reading the content of your text file.
Once you're able to work with each line, you can use String#split to obtain the information that you're looking to grab like so:
"Work Bertha 06:30 11:12".split(' ')
#=> ["Work", "Bertha", "06:30", "11:12"]
Then you need the elapsed time between 2 time points. Ruby has time objects that can parse time from a string, but will set the date as the current date, which shouldn't matter for what you're working on.
require 'time'
employee = ["Work", "Bertha", "06:30", "11:12"]
clock_in = Time.parse(employee[2])
#=> 2016-01-12 06:30:00 -0600
clock_out = Time.parse(employee[3])
#=> 2016-01-12 11:12:00 -0600
Time objects can be subtracted to find the change in time between the two. It'll return the time in seconds. You can add up all the seconds from times someone clocked in/out
clock_out - clock_in
#=> 16920.0
There are many ways to make this more of a human readable time format. I suggest starting here
Every couple of days (2 times a week) a desktop (Win. 7) starts up with my date-time updated. The time, date & month is correct but in year 8113. This makes several programs like Word/Excel working inappropriate & crashing.
BIOS/CMOS battery has been replaced, several antivirus programs had scanned & find find any virusses. No malware or suspicious software is installed.
Does it sounds familiar to someone ?
I would appreciate any help or advice.
Thanks !
I know you would probably like an answer that tackles the origin of your problem. Unfortunately I don't see where this could come from.
Instead, I wanted to suggest that you check your time-synchronization. Windows can sync with time servers and does so in a predefined interval.
You could try to change the time-server and to change the interval.
The time-server can be changed like this:
http://mintywhite.com/windows-7/7maintenance/windows-seven-7-sync-system-clock-with-internet-time-how-to/
The interval has to be changed by altering a registry key, namely
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time
\TimeProviders\NtpClient
(It is in seconds, so 86400 is the value for an interval of 1 day!).
Maybe it's not a fix of the originating problem, but frequent updates of your system time should reduce the resulting problems.
Question is:
Write pseudocode for a program that
calculates the service charge of a
customer owes for writing a bad check.
The program accepts a customer's name,
the date the check was written (year,
month and day), the current date
(year, month and day), and the amount
of the check in dollars and cents. The
program continues until an eof value
is encountered.
The service charge is $20 plus 2
percent of the amount of the check,
plus $5 for every month that has
passed since the check was written. A
check is one month late as soon as a
new month starts-so a bad check
written on September 30 is one month
overdue on October 1.
A program is generally a series of steps. Can you break down the problem into a series of steps necessary to calculate your answer?
Hints:
Every time the month changes, you owe another $5. Thus, "day" is irrelevant.
Next year at the same month, 12 months are passed. The previous month, the number of elapsed months is 12 - 1.
"2% more than" is equivalent to * 1.02
"Continues until EOF is reached" sounds like a loop.
Try to edit your question and make an honest attempt - no-one will solve your homework for you, but we will help you solve it.
In my humble experience, this kind of confusion is caused by trying to solve the problem and write the code at the same time.
Try solving the problem first.
Get a sheet of paper and draw a flowchart which shows the steps and decisions.
e.g. the last box might be:
EOF: Y = Stop, N = go back to "Read next line"
Pick 3 test examples e.g.
In the current month
In the last year
Greater than a year
Work these examples through your flowchart and check that the result is correct. If not, amend the flowchart and rework the test examples.
When you are happy, "translate" the flowchart into English and you will have working pseudo code.
Load the file
Read and store check_date_month in a variable
Read and store current_date_month in a variable
Read and store check_amount in a variable
Service_charge = 20 + 0.02*(check_amount) + [(current_month - check_date_month) + current_date_year - check_date_year]*5
Read customer's name and show to the user something like:
"Customer's Name"
Service charge: "$"Service_charge
The days in this case are not relevant because the charge increases every time the month changes, so, in the case we are in October and the check was done in September (10-9 = 1) we have to pay $5 more, but maybe we could be in different years, for example 2010 and 2009, that means that between October and September there are now (1 + 12 = 13) months, so now you have to pay $65. I expect this will help you to understand step 5.