Search found 80 matches
- 30 Jul 2009 09:46
- Forum: DOS Batch Forum
- Topic: Substrings with DOS
- Replies: 2
- Views: 6168
- 27 Jul 2009 06:39
- Forum: DOS Batch Forum
- Topic: How to map drive and open folder
- Replies: 5
- Views: 9089
Brian, Your command to connect is like this: Net Use %Drive% /Delete 1>Nul 2>Nul Net Use %Drive% \\location\H$ 1>NUL 2>NUL I would assume that you don't need a UserID/Password if it's on your own machine... if not, you might have to add the /User and password to the command. If on a multi-person com...
- 21 Jul 2009 16:25
- Forum: DOS Batch Forum
- Topic: Create an empty text document?
- Replies: 2
- Views: 5321
- 10 Jul 2009 09:50
- Forum: DOS Batch Forum
- Topic: IF File Exist
- Replies: 3
- Views: 14974
Re: IF File Exist
echo off if not exist "C:\Folder A\File Q.txt" goto ELSE echo The file C:\Folder A\File Q.txt DOES exist. >> "IF Test Results.txt" goto END ELSE echo The file C:\Folder A\File Q.txt DOES NOT exist. >> "IF Test Results.txt" :END Try something like this ... echo off if n...
- 07 Jul 2009 23:59
- Forum: DOS Batch Forum
- Topic: Custom directory listing
- Replies: 4
- Views: 7244
- 07 Jul 2009 09:24
- Forum: DOS Batch Forum
- Topic: Custom directory listing
- Replies: 4
- Views: 7244
- 06 Jul 2009 21:47
- Forum: DOS Batch Forum
- Topic: Batch File To Display Directory Size
- Replies: 4
- Views: 13615
- 06 Jul 2009 21:30
- Forum: DOS Batch Forum
- Topic: Filename to DateTime
- Replies: 9
- Views: 12540
- 06 Jul 2009 21:11
- Forum: DOS Batch Forum
- Topic: Listing files with exclusion
- Replies: 13
- Views: 17889
- 06 Jul 2009 13:31
- Forum: DOS Batch Forum
- Topic: Filename to DateTime
- Replies: 9
- Views: 12540
- 06 Jul 2009 11:04
- Forum: DOS Batch Forum
- Topic: Batch File To Display Directory Size
- Replies: 4
- Views: 13615
Remove the %%D from the 2nd FOR Loop .. .as in:
Code: Select all
@echo off
setLocal EnableDelayedExpansion
set /a sum=0
FOR /d %%D in (%1) do (
FOR /R %%I IN (*) DO (
set /a value=%%~zI/1024
set /a sum=!sum!+!value!
)
)
echo Size is: !sum! k
- 06 Jul 2009 09:55
- Forum: DOS Batch Forum
- Topic: Filename to DateTime
- Replies: 9
- Views: 12540
- 06 Jul 2009 09:18
- Forum: DOS Batch Forum
- Topic: String: left-justification with spaces
- Replies: 1
- Views: 4333
Just look at the main web page here...
Align Right
http://www.dostips.com/DtTipsStringOperations.php#Snippets.AlignRight
Align Right
http://www.dostips.com/DtTipsStringOperations.php#Snippets.AlignRight
- 06 Jul 2009 07:00
- Forum: DOS Batch Forum
- Topic: Listing files with exclusion
- Replies: 13
- Views: 17889
- 24 Jun 2009 08:50
- Forum: DOS Batch Forum
- Topic: Batch File -Date & Time
- Replies: 1
- Views: 5045