Search found 14 matches

by kadkam
28 Nov 2014 09:07
Forum: DOS Batch Forum
Topic: [solved] Compare timestamps of two files (seconds too)
Replies: 16
Views: 23853

Re: Compare timestamps of two files (seconds too)

Hi Dave

After some tests I founded this issues:

pippo.txt OK
c:\TEST\pippo.txt OK
c:\TEST 1\pippo.txt FAILED
c:\TEST\pippo,1.txt FAILED
by kadkam
26 Nov 2014 02:09
Forum: DOS Batch Forum
Topic: [solved] Compare timestamps of two files (seconds too)
Replies: 16
Views: 23853

Re: Compare timestamps of two files (seconds too)

Thanks Squash for your "concept", I will study it. Interesting the Compo solution with powershell ! I will study it too. Dear Dave Thanks for your work, I'm using your solution. I completed your code @echo off call :FileModTime test.txt A call :FileModTime pippo.txt B set "diff=0"...
by kadkam
25 Nov 2014 02:45
Forum: DOS Batch Forum
Topic: [solved] Compare timestamps of two files (seconds too)
Replies: 16
Views: 23853

Re: Compare timestamps of two files (seconds too)

thanks for attention. I update first post; I need a simple batch that compare timestamps (modified date) of two files in different folders. Is important to check seconds too; It will be detect difference if value is over 2 seconds. My o.s. is Windows 7 and time in european format (24h) If can help, ...
by kadkam
24 Nov 2014 09:20
Forum: DOS Batch Forum
Topic: [solved] Compare timestamps of two files (seconds too)
Replies: 16
Views: 23853

[solved] Compare timestamps of two files (seconds too)

hi

file A: test.txt
file B: pippo.txt

I need a simple batch that compare timestamps (modified date) of two files in different folders.
Is important to check seconds too; It will be detect difference if value is over 2 seconds.

My o.s. is Windows 7 and time in european format (24h)

thanks
by kadkam
02 Sep 2014 01:34
Forum: DOS Batch Forum
Topic: simple problem
Replies: 1
Views: 2037

simple problem

Hi I have a batch file that copy same file to many folders with incremental number on path. I need to simplify the code. Can you help me? work on this example: copy /y test.jpg 1990\test.jpg copy /y test.jpg 1991\test.jpg copy /y test.jpg 1992\test.jpg copy /y test.jpg 1993\test.jpg copy /y test.jpg...
by kadkam
17 Mar 2014 08:55
Forum: DOS Batch Forum
Topic: segment of variable
Replies: 5
Views: 3484

Re: segment of variable

yes, perfect solution is
~8,4%

(With minus is number of character from right to left)
by kadkam
17 Mar 2014 05:47
Forum: DOS Batch Forum
Topic: segment of variable
Replies: 5
Views: 3484

Re: segment of variable

ops ...was very simple

Code: Select all

echo %pippo:~9,-4%


thanks
by kadkam
17 Mar 2014 04:04
Forum: DOS Batch Forum
Topic: segment of variable
Replies: 5
Views: 3484

segment of variable

Hi I need to extrapolate a segment of variabile. Example C:\YEAR_2014_OK\ I need only "2014" Actually I know only for remove the right of variable @echo off set pippo="c:\year_2012_OK" echo %pippo% echo %pippo:~0,-4% pause Can you correct this code to match the example above? tha...
by kadkam
04 Sep 2013 00:14
Forum: DOS Batch Forum
Topic: Check date file age - output on message box (help)
Replies: 9
Views: 8035

Re: Check date file age - output on message box (help)

uhm ... I think this is another case, you must open another thread.
by kadkam
27 Aug 2013 10:18
Forum: DOS Batch Forum
Topic: Check date file age - output on message box (help)
Replies: 9
Views: 8035

Re: Check date file age - output on message box (help)

my solution work good but write/delete temporary file. your solution is this (tested and is ok now) @if (true == false) @end /* added this harmless hybrid batch/JScript line [ALL BATCH CODE ("AGE CODE" + ALL OTHER CODE)] */ if (WScript.Arguments.Unnamed.length == 1) { var wshShell = WScrip...
by kadkam
27 Aug 2013 08:18
Forum: DOS Batch Forum
Topic: Check date file age - output on message box (help)
Replies: 9
Views: 8035

Re: Check date file age - output on message box (help)

stand alone work ok. Now, I have integrate this batch in to another and I obtain this error: Jscript : Conditional compilation disabled ?? for now, I had to change this: if %diff% GTR 3600 echo msgbox" days%diffDays% hours %diffHours% minutes %diffMins%">diff.vbs&diff.vbs&del diff....
by kadkam
27 Aug 2013 06:51
Forum: DOS Batch Forum
Topic: Check date file age - output on message box (help)
Replies: 9
Views: 8035

Re: Check date file age - output on message box (help)

thanks PenPen

Work great.
I did not imagine a program so long. it is the fault of the support of all types of international date?

Do you know a good bat to exe free converter?
by kadkam
26 Aug 2013 06:38
Forum: DOS Batch Forum
Topic: Check date file age - output on message box (help)
Replies: 9
Views: 8035

Check date file age - output on message box (help)

Hi

I need to compare date file with actual date.

I need an example like this:

If the file (%1) is older than 1hour a message box appear
"The file age is 1 days 2 hour 35minutes"
(if the file age is lower than 1hour no message appear)

Someone can post the batch?

Thanks