1.

Solve : Writing a Batch File to Copy and Open File on CD?

Answer»

Quote from: Salmon Trout on April 19, 2010, 11:30:34 AM

Actually you're not; if you read the code, fsutil is called once for each drive letter that exists.
ONE don't normally (normal circumstances) have that much drives letters being used up , but however it that does occur, you would still NEED to go through that loop and test for each one. ie (if "Z" is really the drive letter for CDROM).
I really should have said that he need to exit the loop once the CDROM drive letter is found so that he won't go through the rest of the letters.Quote from: ghostdog74 on April 19, 2010, 10:16:56 PM
one don't normally (normal circumstances) have that much drives letters being used up , but however it that does occur, you would still need to go through that loop and test for each one. ie (if "Z" is really the drive letter for CDROM).
I really should have said that he need to exit the loop once the CDROM drive letter is found so that he won't go through the rest of the letters.

My CD-ROM drive letters are X on one machine and Z on another.

If 26 letters take AROUND 250 mS, why worry?

Quote from: Salmon Trout on April 20, 2010, 12:16:04 AM
If 26 letters take around 250 mS, why worry?
well, that's fine if you are measuring against a simple task such as find a drive letter and that's all. In general if there are other intermediate tasks inside the for loop that needs to be performed, its still better to use a more efficient approach. I know, not everyone is a speed freak like me... Quote from: ghostdog74 on April 20, 2010, 01:00:45 AM
well, that's fine if you are measuring against a simple task such as find a drive letter and that's all. In general if there are other intermediate tasks inside the for loop that needs to be performed, its still better to use a more efficient approach. I know, not everyone is a speed freak like me...

a Speed freak that prefers interpreted languages? Quote from: BC_Programmer on April 20, 2010, 01:32:47 AM
a Speed freak that prefers interpreted languages?
almost what we do involves interpretation. You write a batch file, and its interpreted by cmd.exe. same as vbscript, Python ,Perl. etc. When i mention "speed freak" i am talking about doing things in the most efficient way, short of writing a real C program (or what the heck, assembly) myself. I want the power and fast development time of an interpreted language as well. got that?Quote from: ghostdog74 on April 20, 2010, 02:39:15 AM
doing things in the most efficient way

That phrase is capable of so many differing interpretationsQuote from: Salmon Trout on April 20, 2010, 11:04:32 AM
That phrase is capable of so many differing interpretations
like?think about it.
Quote from: Salmon Trout on April 21, 2010, 12:05:11 AM
think about it.

i have ALREADY stated my case. doing thing the most efficient way,
1) speed of development. with good data structures and ease of use of my tools, i can create programs to do my task in less than a few minutes.
2) with a good TOOL, I can have better control of the things i want to do, reducing the chances of writing redundant code. With less redundant code, my program/script will run faster.

If you are not going to say what you meant, then what's your point in posting? Quote from: ghostdog74 on April 20, 2010, 01:00:45 AM
well, that's fine if you are measuring against a simple task such as find a drive letter and that's all.

That's what this thread is about.
Quote from: Salmon Trout on April 21, 2010, 12:03:54 PM
That's what this thread is about.
yes, this thread is about that. But my replies all started with TC's comment on his batch's slowness, not directly meant for the OP, trueparadox.


Discussion

No Comment Found