Search found 4506 matches
- 16 May 2011 17:03
- Forum: DOS Batch Forum
- Topic: "universal" %DATE% parser
- Replies: 17
- Views: 148558
Re: "universal" %DATE% parser
Well Dave, don't get me wrong -- this is a batch forum and I appreciate pure batch solutions. My objection was if you use JScript you should make as simple as you can. Normally I try to avoid those chimeras because they slow down your batch file enormously. If there is no (good) possibility with pur...
- 16 May 2011 15:41
- Forum: DOS Batch Forum
- Topic: "universal" %DATE% parser
- Replies: 17
- Views: 148558
Re: "universal" %DATE% parser
Sorry guys, but now I'm totally confused. On the right hand you use JScript-injection, on the left hand nobody has the idea to use it for getting the date directly Why not @set @junk=0 /* The 1st 3 lines should not be changed @echo off & set "@junk=" setlocal for /f "tokens=1-3&qu...
- 12 May 2011 03:11
- Forum: DOS Batch Forum
- Topic: How to kill two processes when there is no taskkill
- Replies: 17
- Views: 26035
Re: How to kill two processes when there is no taskkill
Hi amel27.
I had the same idea but WMIC isn't feasible because it's not available on XP Home.
Regards
aGerman
I had the same idea but WMIC isn't feasible because it's not available on XP Home.
Regards
aGerman
- 11 May 2011 10:25
- Forum: DOS Batch Forum
- Topic: "universal" %DATE% parser
- Replies: 17
- Views: 148558
Re: "universal" %DATE% parser
It works for me as expected
It's a real good alternative if you don't have access to the registry.
Regards
aGerman
It's a real good alternative if you don't have access to the registry.
Regards
aGerman
- 11 May 2011 10:10
- Forum: DOS Batch Forum
- Topic: How to kill two processes when there is no taskkill
- Replies: 17
- Views: 26035
Re: How to kill two processes when there is no taskkill
Thanks. Will appreciate info on Win7 Starter. You're welcome. The result is that there's no tskill.exe on my Win7 Starter. The intention is to uninstall a security application, so the /F may be essential. Should I assume that TSKILL may fail due to its lack of /F ? Yes, I already had this problem i...
- 11 May 2011 09:36
- Forum: DOS Batch Forum
- Topic: Newbie stuck on some variables, substrings etc
- Replies: 4
- Views: 3624
Re: Newbie stuck on some variables, substrings etc
You need the FOR loop to get the sub string to the variable and it's already the 3rd octett (no need for %_var:~25,-4%). @echo off &setlocal for /f "tokens=3 delims=." %%a in ('ipconfig ^|find "192.168"') do set "_var=%%a" echo %_var% pause Regards aGerman
- 11 May 2011 08:31
- Forum: DOS Batch Forum
- Topic: Newbie stuck on some variables, substrings etc
- Replies: 4
- Views: 3624
Re: Newbie stuck on some variables, substrings etc
Try:
Regards
aGerman
Code: Select all
for /f "tokens=3 delims=." %%a in ('ipconfig ^|find "192.168"') do set "var=%%a"
Regards
aGerman
- 11 May 2011 06:34
- Forum: DOS Batch Forum
- Topic: How to kill two processes when there is no taskkill
- Replies: 17
- Views: 26035
Re: How to kill two processes when there is no taskkill
TASKKILL has more options and is more powerful because of the /F switch.
At home I have a machine with Win7 Starter where I will figure out whether TSKILL is available. (Currently I'm at work. I'll come back with this information in some hours.)
Regards
aGerman
At home I have a machine with Win7 Starter where I will figure out whether TSKILL is available. (Currently I'm at work. I'll come back with this information in some hours.)
Regards
aGerman
- 11 May 2011 05:26
- Forum: DOS Batch Forum
- Topic: How to kill two processes when there is no taskkill
- Replies: 17
- Views: 26035
Re: How to kill two processes when there is no taskkill
Just to show you an example how to include the VBScript to a batch code: @echo off &setlocal ( echo Set colProcesses = GetObject^("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2"^) _ echo .ExecQuery^("select * from win32_process where name='" ^& WScript.Argument...
- 11 May 2011 04:40
- Forum: DOS Batch Forum
- Topic: How to kill two processes when there is no taskkill
- Replies: 17
- Views: 26035
Re: How to kill two processes when there is no taskkill
Hi Alan.
As far as I remember you can use TSKILL with only the process name (without .exe). And yes, you need two command lines for two processes. An alternative could be the usage of WMI in VBScript.
Regards
aGerman
As far as I remember you can use TSKILL with only the process name (without .exe). And yes, you need two command lines for two processes. An alternative could be the usage of WMI in VBScript.
Regards
aGerman
- 10 May 2011 16:26
- Forum: DOS Batch Forum
- Topic: I Feel Dumb Asking This, But What Are Pipes For?
- Replies: 12
- Views: 10204
Re: I Feel Dumb Asking This, But What Are Pipes For?
Nah, don't feel stupid. It's only a question of the right commands ... A pipe will transfer the standard-output stream of one command to the next, provided that the second command can process it. That means it doesn't make any sense to pipe the output of ECHO to another ECHO. This is an example to s...
- 10 May 2011 14:36
- Forum: DOS Batch Forum
- Topic: md and move Help experts
- Replies: 20
- Views: 17229
Re: md and move Help experts
Hi Dave. I knew your approach before and (with some minor changes) it would work for me as well. First let me show you my output of echo:|date C:\>echo:|date Aktuelles Datum: 10.05.2011 Geben Sie das neue Datum ein: (TT-MM-JJ) C:\> Well, as you can see your solution isn't language independent, becau...
- 09 May 2011 15:15
- Forum: DOS Batch Forum
- Topic: Need check if file exist older than n days then do a delete.
- Replies: 6
- Views: 12745
Re: Need check if file exist older than n days then do a del
It's the Date Last Modified as you could figure out by yourself if you would type FORFILES /? into a cmd window.
Regards
aGerman
Regards
aGerman
- 09 May 2011 14:27
- Forum: DOS Batch Forum
- Topic: md and move Help experts
- Replies: 20
- Views: 17229
Re: md and move Help experts
Well, if I asked you for real !!! examples I didn't ask out of couriosity. But latest you gave file names without the trailing _m. When I asked you for the output of echo %date% you forgot the seperator (BTW: I still do not know it). Last but not least if you asked for a code that moves the first 10...
- 09 May 2011 04:37
- Forum: DOS Batch Forum
- Topic: md and move Help experts
- Replies: 20
- Views: 17229
Re: md and move Help experts
Hmm, if the batch file moved
0001067426_001_Amsterdam01_1124533.xml
it is looking for
0001067426_001_Amsterdam01_1124533_c*.tiff
where the asterisk is for any character.
What could be wrong?
Regards
aGerman
0001067426_001_Amsterdam01_1124533.xml
it is looking for
0001067426_001_Amsterdam01_1124533_c*.tiff
where the asterisk is for any character.
What could be wrong?
Regards
aGerman