Search found 6 matches
- 20 Oct 2017 05:36
- Forum: DOS Batch Forum
- Topic: for loop on files sometimes reinjects renamed files in the loop !
- Replies: 1
- Views: 2103
for loop on files sometimes reinjects renamed files in the loop !
All is in the title... Hereunder shows a very strange behavior... One file, two loopings... Is this a bug ? Is there a workaround available ? C:\Temp\test>ver Microsoft Windows [Version 6.1.7601] C:\Temp\test>type c:\temp\test.bat @echo off setlocal enabledelayedexpansion dir *.avi for %%a in (*.avi...
- 06 Jul 2015 11:52
- Forum: DOS Batch Forum
- Topic: Is ther a way to manage strings with & and | and " ?
- Replies: 7
- Views: 4814
Re: Is ther a way to manage strings with & and | and " ?
foxidrive wrote:Pilou wrote:Great, repleacing % by ! solves the problem indeed !
Do you know what happens to ! characters?
Hum, no... I hope never get one in my data
- 06 Jul 2015 11:19
- Forum: DOS Batch Forum
- Topic: Is ther a way to manage strings with & and | and " ?
- Replies: 7
- Views: 4814
Re: Is ther a way to manage strings with & and | and " ?
Great ! replacing % by ! solves the problem indeed !
In fact, I just enable delayed expansion by reflex but I didn't know that it has also an effet outside a for loop
Big, big thanx
In fact, I just enable delayed expansion by reflex but I didn't know that it has also an effet outside a for loop
Big, big thanx
- 06 Jul 2015 10:01
- Forum: DOS Batch Forum
- Topic: Is ther a way to manage strings with & and | and " ?
- Replies: 7
- Views: 4814
Is ther a way to manage strings with & and | and " ?
Hi, I would like to know if it's possible to manage strings with at the same time & and | and " ? here is a snippet of my failed attemps : @echo off setlocal enabledelayedexpansion ver echo ============== set ONE=u "A&B" v set TWO=ww %ONE% || xx echo ONE=%ONE% echo TWO=%TWO% e...
- 07 Jan 2014 13:40
- Forum: DOS Batch Forum
- Topic: detect batch launching method (prompt or icon double-click)
- Replies: 13
- Views: 12694
Re: detect batch launching method (prompt or icon double-cli
Great, thx a lot
With Win7 I had to adapt a little bit, which gives :
if "%CMDCMDLINE:~1,2%" == "md" pause
With Win7 I had to adapt a little bit, which gives :
if "%CMDCMDLINE:~1,2%" == "md" pause
- 07 Jan 2014 08:52
- Forum: DOS Batch Forum
- Topic: detect batch launching method (prompt or icon double-click)
- Replies: 13
- Views: 12694
detect batch launching method (prompt or icon double-click)
Hi everyone & thanks for this great and so useful DOS site I have a simple but unfortunately unanswered question : is there a way to detect whether a batch script is launched manually from a command prompt or by icon double-clicking ? The goal is to add a pause only with the second way... Thanks...