Search found 79 matches

by Ocalabob
24 Aug 2011 23:48
Forum: DOS Batch Forum
Topic: How Do we Calculate the Weeknumber for a given date in a yea
Replies: 2
Views: 5738

Re: How Do we Calculate the Weeknumber for a given date in a

Greetings San! You're asking for a batch file solution that would better be solved with a HLL or an Excel spreadsheet. Both would deal with 'week 33' that you typed. Week 33 conforms to ISO 8601 Date and Time Standards which I believe you are looking for rather than a calendar date week of say Janua...
by Ocalabob
18 Aug 2011 20:05
Forum: DOS Batch Forum
Topic: Logging Batch File
Replies: 2
Views: 2871

Re: Logging Batch File

If you just want to log each time a batch file is run then you might try something like this:
echo File %0 run on %date% at %time%>>my_log.txt

Post back and re-phrase your question if your problem is not answered.

Best wishes!
by Ocalabob
14 Jan 2011 10:50
Forum: DOS Batch Forum
Topic: Insert keystroke into executed batch command
Replies: 9
Views: 15407

Re: Insert keystroke into executed batch command

I use Robocopy for such tasks but you may be interested in having a look at the information the link below provides.

http://www.xxcopy.com/xxgroup/m08/msg08387.htm

Best wishes!
by Ocalabob
24 Dec 2010 12:28
Forum: DOS Batch Forum
Topic: Add to a file
Replies: 8
Views: 9007

Re: Add to a file

The lines below work for me with limited testing. Remove the word ECHO if $$$test.txt gives you the desired results.

Best wishes all.

@echo off
for /f "delims=" %%f in (
'dir /b *.*') do (
set name=%%~nxf
ECHO ren "%%~nxf" "a%%~nxf"
)>>$$$test.txt
set name=