Search found 345 matches

by Samir
09 Apr 2017 11:43
Forum: DOS Batch Forum
Topic: use bat file to open application then file
Replies: 3
Views: 1059

Re: use bat file to open application then file

It heavily depends on the application you are using - but to be honest: It sounds more like a job for AutoIt to me. (Although you probably may also use hybrid jscript/bat or C#/bat scripts .) penpen Not only this, but it also depends on the system you are running it on as well. Some systems may hav...
by Samir
09 Apr 2017 11:38
Forum: DOS Batch Forum
Topic: Xcopy switch help
Replies: 4
Views: 1660

Re: Xcopy switch help

Check the dates and times on the two systems involved and make sure they are in sync.

Also, what are the two file systems involved? There are some time/date nuances between FAT and NTFS.
by Samir
19 Feb 2017 16:34
Forum: DOS Batch Forum
Topic: parameter file sent to a batch file
Replies: 1
Views: 816

Re: parameter file sent to a batch file

All batch files have implicit variables starting with %1. Variables are after the batch name on the command line.
by Samir
19 Feb 2017 16:32
Forum: DOS Batch Forum
Topic: Multiple forum sections?
Replies: 7
Views: 1770

Re: Multiple forum sections?

While multiple levels of a forum can be useful, I actually like the single, busy forum. No need to complicate it. Just leave it as is. Everything works fine.
by Samir
19 Feb 2017 16:31
Forum: DOS Batch Forum
Topic: Automatic pdf merger for simular filenames
Replies: 2
Views: 1441

Re: Automatic pdf merger for simular filenames

Easiest way to get this working would be to copy/move those files to a single folder. Otherwise, this will grow in complexity.
by Samir
17 Nov 2015 15:23
Forum: DOS Batch Forum
Topic: Iterating For The Last 60 Days
Replies: 8
Views: 1786

Re: Iterating For The Last 60 Days

Sponge Belly wrote:Hi Samir! :)

Perhaps this post from Nov 2013 may be of interest. ;)

- SB
Thank you! I forgot about this thread. Good reading. 8)
by Samir
10 Nov 2015 09:53
Forum: DOS Batch Forum
Topic: Optimizing These Loops
Replies: 31
Views: 4938

Re: Optimizing These Loops

Yes, we're working with the NT-based command.com equivalent, but it's still the same antiquated language that's been around since the late 1980s. Many of the bats you may write won't work in traditional DOS Maybe it's the way your words come across, but they won't work because it's not "the sa...
by Samir
08 Nov 2015 17:53
Forum: DOS Batch Forum
Topic: Conditional Actions Using Data From Text File
Replies: 20
Views: 4553

Re: Conditional Actions Using Data From Text File

Squashman wrote:Ok. So we are just saying that because we know it will always be a specific line number we just force the code to do so.
Yep, which makes a lot of sense. 8)
by Samir
08 Nov 2015 16:25
Forum: DOS Batch Forum
Topic: Conditional Actions Using Data From Text File
Replies: 20
Views: 4553

Re: Conditional Actions Using Data From Text File

Thank you for the working examples! Great to check the time differences on whatever system you're running on. I looked at both lines where I'm calling findstr and unfortunately the lines where the information I need can vary drastically in the file. Sometimes it might be on line 15, but at other tim...
by Samir
08 Nov 2015 12:02
Forum: DOS Batch Forum
Topic: Conditional Actions Using Data From Text File
Replies: 20
Views: 4553

Re: Conditional Actions Using Data From Text File

Since you're keen on having a good performance I tried to avoid external tools because loading another process for each file will waste your precious time (even more if you call it several times for each file) Otherwise I wouldn't have asked you several times. FOR /L runs fast and you will adjust i...
by Samir
08 Nov 2015 01:42
Forum: DOS Batch Forum
Topic: Running Two Applications Simultaneously Using START /W
Replies: 20
Views: 3107

Re: Running Two Applications Simultaneously Using START /W

I'll keep everything in mind if I run into issues when running the batch later this week with the changes. But for now everything is working. 8)
by Samir
08 Nov 2015 01:40
Forum: DOS Batch Forum
Topic: Conditional Actions Using Data From Text File
Replies: 20
Views: 4553

Re: Conditional Actions Using Data From Text File

aGerman wrote:FIND is an external tool (find.exe) too. Again my question is if you can define a rule for getting the data in your files. E.g. certain data is always in line #X or is always in the line that begins with string Y.
So the line method is faster?
by Samir
07 Nov 2015 15:57
Forum: DOS Batch Forum
Topic: Delayed Expansion in Subs- Again
Replies: 12
Views: 2689

Re: Delayed Expansion in Subs- Again

Have a look at my examples at the end of this thread: http://www.dostips.com/forum/viewtopic.php?f=3&p=36882 Rough rule of thumb: Assigning a variable is safe with delayed expansion disabled. Working with the assigned variable is safe with delayed expansion enabled. Will do! Rule of thumb for m...
by Samir
07 Nov 2015 15:47
Forum: DOS Batch Forum
Topic: Conditional Actions Using Data From Text File
Replies: 20
Views: 4553

Re: Conditional Actions Using Data From Text File

I can replace the findstr with this find equivalent for the same output:

Code: Select all

TYPE %%i|FIND "Total Approved 0"
but is the pipe going to make this less efficient than the findstr?
by Samir
07 Nov 2015 11:25
Forum: DOS Batch Forum
Topic: Delayed Expansion in Subs- Again
Replies: 12
Views: 2689

Re: Delayed Expansion in Subs- Again

Delayed expansion can be a real bane for me. Always great to see refreshes on the subject. 8)