Search found 391 matches

by avery_larry
29 Jul 2013 12:06
Forum: DOS Batch Forum
Topic: business day date math ideas
Replies: 3
Views: 6451

Re: business day date math ideas

Well, it was worth a shot. I'll just code it the long way basically using what Aacini posted.
by avery_larry
23 Jul 2013 19:47
Forum: DOS Batch Forum
Topic: business day date math ideas
Replies: 3
Views: 6451

business day date math ideas

I'm just looking for ideas on date math but skipping weekends (and holidays maybe). I've got a scanning (paper to pdf) process that's partly done by people, and partly done by computers. I'm going to track the progress of individual batches via a simple log file concept. Well anyway -- I have a moni...
by avery_larry
11 Mar 2011 10:59
Forum: DOS Batch Forum
Topic: HELP Simple IF File Moving!!!
Replies: 1
Views: 4612

Re: HELP Simple IF File Moving!!!

SO --

I'm not clear on when you want to copy the other file . . ?

IF hello.txt exists, then delete it and do nothing else? Or delete it and then copy the other file?


IF hello.txt does not exist, then copy the other file?
by avery_larry
04 Mar 2011 10:40
Forum: DOS Batch Forum
Topic: not so staright forward dos script query.....
Replies: 8
Views: 11553

Re: not so staright forward dos script query.....

Do you mean c:\any_dir*\run OR do you mean c:\*\run? if you meant c:\any_dir*\run\ABCD then: set dest=c:\newfolder md "%dest%" >nul 2>nul rem Start in the parent folder cd /d "c:\" for /d %%a in (any_dir*) do move "%%a\run\ABCD" "%dest%\%%a_ABCD" >nul 2>nul if...
by avery_larry
09 Feb 2011 11:06
Forum: DOS Batch Forum
Topic: renaming fails
Replies: 8
Views: 10973

Re: renaming fails

t:\program\renamedfiles must exist.
probably want to use *.kvi since it's an extension
path probably should be in quotes:

move "%tmpdir%\*.kvi" "t:\program\renamedfiles"
by avery_larry
28 Jan 2011 10:08
Forum: DOS Batch Forum
Topic: string manipulation help
Replies: 30
Views: 33042

Re: string manipulation help

*untested*

Try:

findstr /i /c:"%buildPatch%"

Also, you probably want "delims=" instead of "tokens=* delmis= ". On the very rare case that a line *starts* with a delimiter, it will be stripped (which can be very useful when needed).
by avery_larry
24 Jan 2011 11:42
Forum: DOS Batch Forum
Topic: "RUN AS ..." may destroy Windows\System32
Replies: 5
Views: 8513

Re: "RUN AS ..." may destroy Windows\System32

You should never assume the location that a script file is run from. If it's important you should always explicitly specify the current directory.

always.

And then, if it's important (like using del *.exe), you should double check that you're in the correct directory.
by avery_larry
21 Jan 2011 09:50
Forum: DOS Batch Forum
Topic: Remove leading characters and pass to new variable
Replies: 4
Views: 7658

Re: Remove leading characters and pass to new variable

untested:

This part:
!filenames:~73,0!
will return 0 characters skipping the first 72 characters. I believe you want:
!filenames:~73!

Which just skips the first 72 characters and returns everything else.
by avery_larry
21 Jan 2011 09:41
Forum: DOS Batch Forum
Topic: mailto
Replies: 5
Views: 10185

Re: mailto

both blat.exe and sendemail.exe are very simple to use. google them to download. Post your command and error messages if you still have problems.
by avery_larry
19 Jan 2011 10:56
Forum: DOS Batch Forum
Topic: Insert keystroke into executed batch command
Replies: 9
Views: 17660

Re: Insert keystroke into executed batch command

Well -- I shouldn't post what I don't know about, I guess. I don't know anything about xxcopy.
by avery_larry
17 Jan 2011 12:18
Forum: DOS Batch Forum
Topic: Parsing command output into variable
Replies: 8
Views: 13897

Re: Parsing command output into variable

It looks like the devcon output has 3 lines, so the for loop goes through 3 times. The first line doesn't have () so it skips the "do" portion. The next 2 lines both have (), so the "set" command is run twice -- first it sets the variable to com5, and then it sets it to s. The va...
by avery_larry
17 Jan 2011 11:52
Forum: DOS Batch Forum
Topic: Insert keystroke into executed batch command
Replies: 9
Views: 17660

Re: Insert keystroke into executed batch command

Can't something like this be done:

echo.y|xxcopy . . .

or

xxcopy ... < echo.y

or

echo.y>y.txt
xxcopy ... <y.txt


or

echo.y>y.txt
type y.txt|xxcopy ...


I thought some variation of those options were typically able to do the "press any key" idea . . .
by avery_larry
11 Jan 2011 13:11
Forum: DOS Batch Forum
Topic: Set list of sobfolder as string
Replies: 7
Views: 10001

Re: Set list of sobfolder as string

but not everybody has a python at the office.

So true, so true.


:lol:
by avery_larry
11 Jan 2011 12:06
Forum: DOS Batch Forum
Topic: Variable able to run various apps from same location
Replies: 10
Views: 12992

Re: Variable able to run various apps from same location

If you have a definite set of programs that you care about: @echo off setlocal enabledelayedexpansion set word=c:\program files\microsoft office\office12\winword.exe set excel=c:\program files . . . \excel.exe set notepad=c:\windows\notepad.exe rem you can add others here. set program=%1 if not defi...
by avery_larry
11 Nov 2010 12:32
Forum: DOS Batch Forum
Topic: OS and architecture
Replies: 4
Views: 8138

Re: OS and architecture

That looks promising. Thanks.