Search found 14 matches

by tonysathre
20 Apr 2012 14:57
Forum: DOS Batch Forum
Topic: Removing All Spaces from CSV
Replies: 5
Views: 7722

Re: Removing All Spaces from CSV

Code: Select all

@echo off & setlocal enabledelayedexpansion
set in=file.csv
set out=file2.csv
for /f "tokens=*" %%i in ('type %in%') do (
   set line=%%i
   >>%out% echo !line: =!
)
by tonysathre
11 Apr 2012 14:00
Forum: DOS Batch Forum
Topic: Drawing rudimentary graphics in text mode
Replies: 46
Views: 65644

Re: Drawing rudimentary graphics in text mode

Wow this is really cool stuff. Writing out color with findstr is nice a trick.

Tony
by tonysathre
11 Apr 2012 11:27
Forum: DOS Batch Forum
Topic: ownership + permission script
Replies: 5
Views: 4962

Re: ownership + permission script

Are you using Active Directory? You should store the profiles on a network share so this wouldn't wouldn't be an issue.

On Windows 7:

Code: Select all

@echo off
icacls c:\profiles\* /save ACLs /T
takeown /f /r /a /d y c:\profiles\*
do stuff...
icacls c:\profiles\ /restore ACLs


Tony
by tonysathre
10 Apr 2012 08:29
Forum: DOS Batch Forum
Topic: How set name of batch as variable
Replies: 12
Views: 10615

Re: How set name of batch as variable

I think this is what you mean. As long as the SHIFT command isn't used in the batch script. IF NOT %errorlevel%==0 CSCRIPT error_script.vbs "%~nx0" email etc.etc. Doesn't %~0 expand to the same thing as %~nx0? I know what the n and x do, but I just tested it and it produced the same outpu...
by tonysathre
10 Apr 2012 08:22
Forum: DOS Batch Forum
Topic: How set name of batch as variable
Replies: 12
Views: 10615

Re: How set name of batch as variable

IF NOT %errorlevel%==0 CSCRIPT error_script.vbs %~0 email etc.etc.

Tony
by tonysathre
26 Mar 2012 10:50
Forum: DOS Batch Forum
Topic: Clear typeahead buffer in DOS
Replies: 3
Views: 4649

Re: Clear typeahead buffer in DOS

This may be what you're looking for:

doskey /keysize:1

Tony
by tonysathre
23 Mar 2012 10:33
Forum: DOS Batch Forum
Topic: search for list of filenames in a single file
Replies: 10
Views: 10986

Re: search for list of filenames in a single file

I thought that regex was only used when you specify /R. Is that not the case?

Tony
by tonysathre
22 Mar 2012 08:01
Forum: DOS Batch Forum
Topic: map network
Replies: 7
Views: 6833

Re: map network

That's true, but considering he was mapping the drive, I assumed it would have been the first time the drive was accessed.

Tony
by tonysathre
22 Mar 2012 07:41
Forum: DOS Batch Forum
Topic: Writing a batch file to open Recycle Bin or Control Panel
Replies: 11
Views: 22618

Re: Writing a batch file to open Recycle Bin or Control Pane

d360991 wrote:This is so simple. Great.

On Windows 7, is it possible to open different elements of the control panel via batch files? For example, Scheduled Tasks?

Thanks again,
-Nina



taskschd.msc
by tonysathre
22 Mar 2012 07:38
Forum: DOS Batch Forum
Topic: Writing a batch file to open Recycle Bin or Control Panel
Replies: 11
Views: 22618

Re: Writing a batch file to open Recycle Bin or Control Pane

It does if you disable "Hide protected Operating System files"

Tony
by tonysathre
22 Mar 2012 06:13
Forum: DOS Batch Forum
Topic: search for list of filenames in a single file
Replies: 10
Views: 10986

Re: search for list of filenames in a single file

C:\temp>findstr "1.txt 2.txt" information.txt
1 1.txt
2 2.txt
4 2.txt
7 2.txt
9 2.txt
10 1.txt
C:\temp>
by tonysathre
22 Mar 2012 05:58
Forum: DOS Batch Forum
Topic: Writing a batch file to open Recycle Bin or Control Panel
Replies: 11
Views: 22618

Re: Writing a batch file to open Recycle Bin or Control Pane

On Windows 7:

start c:\$RECYCLE.BIN
control
by tonysathre
22 Mar 2012 05:04
Forum: DOS Batch Forum
Topic: map network
Replies: 7
Views: 6833

Re: map network

You have to use double quotes around paths or file names with spaces. @echo off net use r: "\\000.00.0.00\Program Files\Microsoft SQL Server\MSSQL\BACKUP" cd \ R: Xcopy . /D /I /F /E /Y "D:\Backup\Sql_Backup" net use r: /delete /y Not sure why you were CDing to the root of the R:...