Search found 18 matches
- 14 Jan 2016 01:19
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
I posted the final versions of them on my web site (mennen.org). Just click on the link labeled "batch scripts" (about half way down the home page). Well, I thought they were final. I just updated them again. Nothing serious, although one of the scripts was not deleting the temporary file...
- 13 Jan 2016 05:33
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
This is getting a bit away from my original question that started the thread, but I thought I would report on one last minor problem I ran into with the last script that I posted for listing mp3 files (mp3time.bat). It turns out it won't work if run from the root folder on the drive. The reason is t...
- 09 Jan 2016 15:11
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
you argued about moving the "setlocal enabledelayedexpansion" line I don't remember arguing about that one since at the time I understood little about its use and in fact I still don't understand it perfectly. I tend to challenge everything I hear in an attempt to understand it better, so...
- 09 Jan 2016 00:25
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
My comment about processing an entire file still stands Yes, that turned out to be the real key to make the script idea feasible for very large file collections. My final script for processing mp3 files is shown below. I plan to modify my script for processing video files to use the same technique ...
- 05 Jan 2016 23:35
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
Squashman wrote:Food for thought. Guess which one runs quicker.
Woe ... the one with the pipe runs 40 times slower!
Thanks for the tip. That will help somewhat.
I don't know how either statement works. What is that /p do anyway?
~Paul
- 05 Jan 2016 20:42
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
The code by Squashman works and runs reasonably fast. I thought I tried exactly what he wrote the very first time, but it didn't work. Perhaps I missed the quotes around one of the items in the string comparison. But it is so hard to figure out why it isn't working, I just went round and round tryin...
- 05 Jan 2016 14:14
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
Are you trying to get this: echo !p! 1>&2 Output to this file: >"%temp%" No, that echo goes to the console as intended. The problem is with the if statement. I know the if condition is sometimes true, but the script is behaving as if the if condition is never true. So I must be doing ...
- 05 Jan 2016 08:09
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
Man, I can't believe I can't get such a simple loop to work. All I'm trying to do is echo the path whenever it changes. Here is my code @echo off set "ffprobe=c:\Util\ffprobe.exe" set "temp=%temp%\ffprobe.txt" set pt=abc setlocal enabledelayedexpansion ( for /R %%G IN (*.mp3) do ...
- 05 Jan 2016 07:07
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
Ok ... if you request it again, I'll still post my other version that you wanted (simpler, without the extra dump every 100 files), but I think that is now irrelevant given what I've reported below. A brief comment - you use call which is notoriously slow ... Well the "call" at least has n...
- 05 Jan 2016 04:10
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
See if you can find any files with an ! in the name, in your output file You are right ... all the files with and ! in them are missing. GAHH#$#@&%(^!=!+!"; Now that I've been running my mp3 script for almost 2 days now, it is just about finished. And all of it useless! I did put the delay...
- 04 Jan 2016 14:07
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
I found in my test, comparing your output to mine, that only a few files vary by a single MB - is that significant? Actually when truncating as you were doing, very close to half the files will be rounded down when rounding up would be more appropriate. You are right that this is not all that signi...
- 02 Jan 2016 21:21
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
In case there is anyone left following this thread, I made one more useful modification to the batch file. I found that most often it was useful to have the path name included in front of the filename, so I added that. However then I found that the part of the path that was common to all the lines w...
- 02 Jan 2016 06:54
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
and you clearly have a good grasp of it all... Perhaps not as good a grasp as you though. My tee filter method using wtee failed miserably when it hit a file name containing an ampersand sign. I hadn't noticed that problem when I posted my last script. So I had to rethink that. The method you used ...
- 01 Jan 2016 14:42
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
Batch code can process quite a bit - but it's not straightforward and it's inherently slow compared to sed etc, and batch code chokes on different characters as it does with & but the data in ffprobe output is safe to process fortunately. It is slightly slower than my old version, but not that ...
- 01 Jan 2016 05:16
- Forum: DOS Batch Forum
- Topic: Escaping an ampersand character
- Replies: 36
- Views: 28926
Re: Escaping an ampersand character
I downloaded ffmprobe and found there were results from different files that skewed the variables, so I've added a compare for some variations in the ffmprobe output - this is tested here and seems to work ok. Wow, foxidrive. That looks like it was a lot of work. Amazing, you didn't even you sed. I...