Search found 16 matches

by sxekjb
28 Mar 2010 10:55
Forum: DOS Batch Forum
Topic: Need help renaming large amounts of files
Replies: 2
Views: 1729

Re: Need help renaming large amounts of files

very good, thank you. Had to run the batch a few times for names with multiple "&" in it, but worked great.
by sxekjb
27 Mar 2010 19:27
Forum: DOS Batch Forum
Topic: Need help renaming large amounts of files
Replies: 2
Views: 1729

Need help renaming large amounts of files

I need to rename files that have "&" in the name and replace with "and". I'm using dir /s /a | find /i "&" to find all of the file names.

Thanks
by sxekjb
26 Mar 2010 13:03
Forum: DOS Batch Forum
Topic: set var from arp output.....i'm not sure how
Replies: 1
Views: 1432

Re: set var from arp output.....i'm not sure how

you can put the output of arp to a file and use it as a variable there using

Code: Select all

@echo off
set arp=arp -a
%arp% | find /i "00-1C-C0-4A-ED-AD" >>output.log
for /f "tokens=1,2,3 delims= " %%G IN (output.log) DO set IP=%%G
echo %IP%
pause
del output.log
by sxekjb
26 Mar 2010 07:41
Forum: DOS Batch Forum
Topic: Starting and Stopping Services in Windows
Replies: 6
Views: 5202

Re: Starting and Stopping Services in Windows

psservice start/stop/restart etc included with pstools

http://technet.microsoft.com/en-us/sysi ... 96649.aspx
by sxekjb
03 Feb 2010 06:46
Forum: DOS Batch Forum
Topic: How to check for installed softwares in a system
Replies: 5
Views: 2759

Re: How to check for installed softwares in a system

I've had most success querying for installed software by going through hklm\software\microsoft\windows\currentversion\uninstall This has a list of installed software and keys that give info on the displayname,version, install location etc. try using the reg command and output the results. IE REG QUE...
by sxekjb
29 Jan 2010 09:54
Forum: DOS Batch Forum
Topic: Defining a variable by user input for creating folder PSExec
Replies: 8
Views: 5032

Re: Defining a variable by user input for creating folder PSExec

Just my input, but I've never gotten set /p to work through a psexec remote command terminal; There's an unknown on-going keyboard input issue with it, just google "set /p psexec" and you'll see what I mean. Tks
by sxekjb
11 Jan 2010 14:09
Forum: DOS Batch Forum
Topic: vbscript vs dos
Replies: 4
Views: 2795

Thanks for your response. As far as I can see I can do everything vbscript can do with command prompt. If anyone has any examples to give as to why some scripts are preferred to be written in vbscript I'd like to see it.
by sxekjb
08 Jan 2010 13:54
Forum: DOS Batch Forum
Topic: vbscript vs dos
Replies: 4
Views: 2795

vbscript vs dos

I know this is discussed in a multipage thread argument, but can someone give me the pros and cons of both and include a scenario. In other words what makes vbscript more powerful than using a dos batch.
by sxekjb
12 Dec 2009 21:39
Forum: DOS Batch Forum
Topic: SET /P credentials q
Replies: 4
Views: 2635

Thanks! that function worked out very nicely.
by sxekjb
11 Dec 2009 17:31
Forum: DOS Batch Forum
Topic: Help with FOR /D with space in pathname
Replies: 3
Views: 2427

try using

Code: Select all

FOR /D %%i IN (C:\docume~1\TestLogs\ABC*) DO RMDIR /S /Q %%i 
by sxekjb
11 Dec 2009 17:23
Forum: DOS Batch Forum
Topic: SET /P credentials q
Replies: 4
Views: 2635

Sorry, I don't think clear text are the words I'm looking for, but I'm trying to use set /p to prompt for credentials to set as a variable. Is there a way to make whatever the user enters to not show up, or just doesn't show any characters. example: set /p pw=password please: when the user enters th...
by sxekjb
11 Dec 2009 15:00
Forum: DOS Batch Forum
Topic: SET /P credentials q
Replies: 4
Views: 2635

SET /P credentials q

if you're using set /p to prompt for user credentials, is there a way to make whatever text that's entered in clear text.
by sxekjb
06 Dec 2009 16:17
Forum: DOS Batch Forum
Topic: DOS reverse redirection
Replies: 3
Views: 2262

http://ss64.com/nt/for_f.html

You can set different contents of a file as a token and perform a command against it using the for /f command.
by sxekjb
12 Nov 2009 08:33
Forum: DOS Batch Forum
Topic: Need to know if this is possible
Replies: 1
Views: 1755

Figured it out. Created notepad list of names with the old name as token=1 and new as token=2 Then: FOR /f "tokens=1,2 delims= " %%G IN (names.txt) DO netdom renamecomputer %%G /newname:%%H /userD:domain\username /passwordD:password /userO:domain\username /passwordO:password
by sxekjb
09 Nov 2009 14:53
Forum: DOS Batch Forum
Topic: Need to know if this is possible
Replies: 1
Views: 1755

Need to know if this is possible

I need to rename quite a lot of machines over the domain. Right now I'm doing this using the netdom command netdom renamecomputer mycomputer /newname:new_name /ud:domain\user /pd:password -I'm having to go through this step every time. I'm wondering if there's a way to create a batch that will autom...