Search found 378 matches

by !k
22 Nov 2011 11:10
Forum: DOS Batch Forum
Topic: Dos Command/Batch file to find a folder path & file size
Replies: 8
Views: 16175

Re: Dos Command/Batch file to find a folder path & file size

renzlo real problem is 2,147,483,648 limit of CMD mathematic pallavi_23 @echo off &setlocal enableextensions set "dir=D:" for /d %%d in ("%dir%\*") do call :size "%%d" pause goto :eof :size set "all=0" setlocal enabledelayedexpansion for /f "tokens=1...
by !k
16 Nov 2011 15:46
Forum: DOS Batch Forum
Topic: Reverse Parsing
Replies: 10
Views: 12357

Re: Reverse Parsing

by !k
05 Nov 2011 09:07
Forum: DOS Batch Forum
Topic: Determine parent folder name without entire folder path?
Replies: 17
Views: 21326

Re: Determine parent folder name without entire folder path?

@echo off &setlocal enabledelayedexpansion for %%r in ( "C:\This\Works\This Works.TMP" "C:\This\Works\" "C:\This\Works" "C:\This\" "C:\" ) do (pushd %%r 2>nul &&(for %%r in ("!cd!") do echo ParentFolderName = "%%~nxr"...
by !k
04 Nov 2011 14:46
Forum: DOS Batch Forum
Topic: Determine parent folder name without entire folder path?
Replies: 17
Views: 21326

Re: Determine parent folder name without entire folder path?

it works fine on XP.
what`s your OS?
by !k
04 Nov 2011 13:42
Forum: DOS Batch Forum
Topic: Determine parent folder name without entire folder path?
Replies: 17
Views: 21326

Re: Determine parent folder name without entire folder path?

Code: Select all

for %%i in ("%~dp0.") do echo ParentFolderName = "%%~nxi"
by !k
04 Nov 2011 08:01
Forum: DOS Batch Forum
Topic: numbers in variables
Replies: 16
Views: 13903

Re: numbers in variables

vbs?

Code: Select all

@echo off
>calc.vbs echo WScript.Echo Eval(WScript.Arguments(0))

set pi=3.14159
call:calc 2 * %pi%
call:calc %pi% ^^ 2
del /q calc.vbs
goto:eof

:calc
cscript //nologo calc.vbs "%*"
goto:eof
by !k
04 Nov 2011 04:51
Forum: DOS Batch Forum
Topic: numbers in variables
Replies: 16
Views: 13903

Re: numbers in variables

Mohammad_Dos wrote:it does not work for me:

Code: Select all

clc 2 * %pi%
really?
viewtopic.php?p=5672#p5672
by !k
03 Nov 2011 09:06
Forum: DOS Batch Forum
Topic: Backup File in BAT file with certain options
Replies: 12
Views: 8371

Re: Backup File in BAT file with certain options

for /f "skip=1 delims=." %%d in ('wmic OS Get LocalDateTime') do (copy /b "chauffeur.accdb" "chauffeur_%%d.accdb" >nul &goto:del) :del for /f "skip=5" %%f in ('dir /b/a-d/o-d/tc "chauffeur_??????????????.accdb"') do del /q "%%f" what`s...
by !k
03 Nov 2011 07:55
Forum: DOS Batch Forum
Topic: Backup File in BAT file with certain options
Replies: 12
Views: 8371

Re: Backup File in BAT file with certain options

what is output of

Code: Select all

for /f "skip=1 delims=." %%d in ('wmic OS Get LocalDateTime') do echo _%%d_
by !k
03 Nov 2011 07:38
Forum: DOS Batch Forum
Topic: numbers in variables
Replies: 16
Views: 13903

Re: numbers in variables

only if you add them as string
c:\>set pi=3.14159

c:\>clc 2 * %pi%
6.28318
c:\>clc %pi% ^^ 2
9.8695877281
by !k
02 Nov 2011 16:20
Forum: DOS Batch Forum
Topic: [Question] Time Clock
Replies: 4
Views: 4511

Re: [Question] Time Clock

My questions is if there is another way then pinging my computer..
A mmm... Another way to wait?
Need to create a 60 minutes delay in my DOS script
by !k
02 Nov 2011 15:56
Forum: DOS Batch Forum
Topic: Backup File in BAT file with certain options
Replies: 12
Views: 8371

Re: Backup File in BAT file with certain options

"chauffeur %digit% .accdb" name allowed only? May it be "chauffeur %date%%time% .accdb" ? for /f "skip=1 delims=." %%d in ('wmic OS Get LocalDateTime') do copy /b "chauffeur.accdb" "chauffeur_%%d.accdb" for /f "skip=5" %%f in ('dir /b/o-d/t...
by !k
01 Nov 2011 07:33
Forum: DOS Batch Forum
Topic: Password generator script
Replies: 2
Views: 3815

Re: Password generator script

echo off setlocal enabledelayedexpansion set user=username set domain=@domain FOR /L %%G IN (1,1,5) DO ( set /a pwresult=%%G*5 echo %user%%%G%domain% !pwresult! >> passwords.txt ) What I want to do is to multiply the username number with a set of fixed values, for example (<user number> * 123 * 456...