Search found 43 matches

by sambasiva
28 Jan 2015 12:34
Forum: DOS Batch Forum
Topic: How to inherit the global path in a new command prompt
Replies: 4
Views: 5531

Re: How to inherit the global path in a new command prompt

Thanks all for your replies. 1) I have a cmd prompt where the below path is set. Path=C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\; 2) In this command prompt I invoke an ant script which installs some new products and set some extra path and per...
by sambasiva
28 Jan 2015 07:45
Forum: DOS Batch Forum
Topic: How to inherit the global path in a new command prompt
Replies: 4
Views: 5531

Re: How to inherit the global path in a new command prompt

Thanks for your reply.

I have a question further.
Is there a way to start a new cmd window to use the environment from the global environment variables (the ones we see from the mycomputer--->properties).


Thanks
Siva
by sambasiva
27 Jan 2015 23:48
Forum: DOS Batch Forum
Topic: How to inherit the global path in a new command prompt
Replies: 4
Views: 5531

How to inherit the global path in a new command prompt

Hi, Could you please help me with the below query. I have started a command prompt and the PATH (global path) set in it is as below: Path=C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\ ;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files...
by sambasiva
28 Jul 2014 11:19
Forum: DOS Batch Forum
Topic: How to get the windows login user password in a plain text ?
Replies: 1
Views: 3119

How to get the windows login user password in a plain text ?

Hi,

Is there a command/script possible to get the password (in plain text) for the user who logged in to the windows machine ?

Thanks
Samba
by sambasiva
25 May 2014 11:00
Forum: DOS Batch Forum
Topic: function call inside function is not working
Replies: 6
Views: 6229

Re: function call inside function is not working

Added the below line to the original script to trim the CR at the end. Still I see the same issue for /f "tokens=* delims=" %%A in ("%%I") do set COMMAND_LINE=%%A @ECHO off SETLOCAL ENABLEDELAYEDEXPANSION goto :upServers :getFullDomainPath echo "Get full domain path" go...
by sambasiva
25 May 2014 10:37
Forum: DOS Batch Forum
Topic: function call inside function is not working
Replies: 6
Views: 6229

Re: function call inside function is not working

Hi foxidrive, WMIC command is correct and returns the command line of the java processes running. Output of the snippet you posted is: (replaced the complete command with ******) ---------------------------------- "ADC06BZD ******weblogic.Server,16608 " Press any key to continue . . . Howe...
by sambasiva
25 May 2014 09:04
Forum: DOS Batch Forum
Topic: function call inside function is not working
Replies: 6
Views: 6229

function call inside function is not working

Hi All, I have the following batch script which calls the function inside another function. ------------------- @ECHO off SETLOCAL ENABLEDELAYEDEXPANSION goto :upServers :getFullDomainPath echo "Get full domain path" goto :eof :getProcesses FOR /f "tokens=* delims=" %%I in ('wmic...
by sambasiva
21 May 2014 21:16
Forum: DOS Batch Forum
Topic: function call by referrence is not wokring
Replies: 2
Views: 3239

Re: function call by referrence is not wokring

Thanks a lot for your help.
Will try the same.

-Thanks
SS
by sambasiva
21 May 2014 12:12
Forum: DOS Batch Forum
Topic: function call by referrence is not wokring
Replies: 2
Views: 3239

function call by referrence is not wokring

@echo off SETLOCAL ENABLEDELAYEDEXPANSION set domain_home=C:\AT\instance\domains\ADC06b~1.COM\COMMON~1 set temppath=%domain_home% set "temp=" goto :parseDomain :getParentDir for /f "tokens=*" %%A in ('dir /b %~2.?' ) do (echo domainname=%%A) for /f "tokens=*" %%B in (&q...
by sambasiva
21 May 2014 09:30
Forum: DOS Batch Forum
Topic: converting short path name to long path name
Replies: 4
Views: 7701

Re: converting short path name to long path name

Hi pieh-ejdsch,

Dir /s/b/x C:\instance\domains\DAC04Q~1.COM\COMMON~1.?

returns only the fullname of the last directory i.e. commondomain is the output I get when the above command is run.

is there a way I can get the full name of the complete path ?


Thanks
SS
by sambasiva
20 May 2014 01:05
Forum: DOS Batch Forum
Topic: how to supress directory too long messages
Replies: 14
Views: 13891

Re: how to supress directory too long messages

Hi Antonio,

Thanks a lot. It worked like a charm for my requirement.
Now I don't see the long path messages.


One more question, does for /R can be used in similar fashion to distinguish the files and folders ?

Thanks
SS
by sambasiva
19 May 2014 03:53
Forum: DOS Batch Forum
Topic: how to continue the next iteration in for loop
Replies: 1
Views: 22495

how to continue the next iteration in for loop

Hi All, I am looking for a continue equivalent in batch script. Is there a way we can continue the next iteration of the for loop breaking the current iteration based on a condition. ------- @echo off SETLOCAL ENABLEDELAYEDEXPANSION for /f %%A in ('dir /b C:\') do ( set value=%%A if "!value!&qu...
by sambasiva
18 May 2014 22:54
Forum: DOS Batch Forum
Topic: how to supress directory too long messages
Replies: 14
Views: 13891

Re: how to supress directory too long messages

Hi Foxidrive, I am able to suppress those message by re-directing the stderr of the batch file to nul as below: C:\>test.cmd C:\test\instance\domains 2>nul test.cmd contains the below code --------------------- FOR /F "delims=" %%a in ('dir /b /s /a-d %LOCAL_DOMAINS_DIR%\*.state') do ( SET...
by sambasiva
18 May 2014 21:46
Forum: DOS Batch Forum
Topic: how to supress directory too long messages
Replies: 14
Views: 13891

Re: how to supress directory too long messages

No. This folder exists on the local disk itself. However this is a shared directory.
by sambasiva
18 May 2014 10:35
Forum: DOS Batch Forum
Topic: how to supress directory too long messages
Replies: 14
Views: 13891

Re: how to supress directory too long messages

Yes, I tried it.
Those messages are still there, however the stdout is empty.

Thanks
SS