Search found 25 matches

by Olyrd
14 Jan 2017 08:10
Forum: DOS Batch Forum
Topic: Driver setup
Replies: 0
Views: 6687

Driver setup

Hello, I need to write a batch script that will iterate through 1st level subfolders in search for a defined list of executables, which will need to be executed in order. Here's an example on what needs to be achieved: 8.1_x64 4g_sp72426 audio_sp77176 bluetooth_broadcom_sp70725 bluetooth_intel_sp726...
by Olyrd
20 Apr 2016 03:50
Forum: DOS Batch Forum
Topic: Printer IP Finder
Replies: 19
Views: 18983

Re: Printer IP Finder

I'm sorry if you think I was disrespectful. I have thanked you in numerous posts on this thread. I just assumed this would be self-explanatory. If you look at my other posts you'll see that I've always been respectful and thanked all of helped me. The thing is that you guys help the common user very...
by Olyrd
15 Apr 2016 05:43
Forum: DOS Batch Forum
Topic: Refresh CMD window to new settings
Replies: 6
Views: 7880

Re: Refresh CMD window to new settings

SCHTASKS will do the trick but how to make it appear the CMD window? I mean any batch script eneterd in a task will be run hidden. Any way to make it visible?
by Olyrd
14 Apr 2016 11:45
Forum: DOS Batch Forum
Topic: Refresh CMD window to new settings
Replies: 6
Views: 7880

Re: Refresh CMD window to new settings

That's awesome but I don't it it fits here. I also want to turn on QuickEdit and enlarge Buffer Size.
by Olyrd
14 Apr 2016 10:04
Forum: DOS Batch Forum
Topic: Refresh CMD window to new settings
Replies: 6
Views: 7880

Refresh CMD window to new settings

I'm using the following code to tweak CMD settings and to automatically run it as administrator: CLS ECHO. ECHO ============================= ECHO Running Admin shell ECHO ============================= :checkPrivileges NET FILE 1>NUL 2>NUL if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto ...
by Olyrd
11 Apr 2016 14:03
Forum: DOS Batch Forum
Topic: Best way to make a large text file?
Replies: 5
Views: 7475

Re: Best way to make a large text file?

You need something like this: m That would be great for tests but I needed something directly in batch. Two ways that I know of but neither of these are by no means random. 2) This one just creates a file with the same character repeated several times which I got from Dave many years ago for doing ...
by Olyrd
11 Apr 2016 10:47
Forum: DOS Batch Forum
Topic: Best way to make a large text file?
Replies: 5
Views: 7475

Best way to make a large text file?

What would be the simplest way to make a large text file (>60MB) filled with random data (words, letters, logs, anything)? I'm not looking to create fake sparse files. I need a way to make massive ammounts of useless random text to be outputted in a .txt file. At first I was going to use WEVTUtil qu...
by Olyrd
10 Apr 2016 12:42
Forum: DOS Batch Forum
Topic: Batch to delete directory with path-too-long problem.
Replies: 16
Views: 21192

Re: Batch to delete directory with path-too-long problem.

Please accept my apologies for resurrecting this thread but I'd also like a sollution to this issue. What we known conclusively is that a directory with a depth of more that 256 characters (slashes included) cannot be deleted by normal means. On the web you find people recommending 7-zip manager to ...
by Olyrd
10 Apr 2016 07:44
Forum: DOS Batch Forum
Topic: Delete contents folder context with check
Replies: 1
Views: 2978

Delete contents folder context with check

I'm trying to add a conext menu that will detele the selected folder's contents but I want to check if the current path is set to the selected folder first. I've written the following but It doesn't work. It does change to the folder but doesn't delete anything. REG ADD "HKEY_CLASSES_ROOT\Direc...
by Olyrd
09 Apr 2016 16:25
Forum: DOS Batch Forum
Topic: Execute command every 5 min off multiple drives
Replies: 4
Views: 4968

Re: Execute command every 5 min off multiple drives

Great work guys! Works as expected.
Thank you so much.
:D
by Olyrd
09 Apr 2016 13:28
Forum: DOS Batch Forum
Topic: Execute command every 5 min off multiple drives
Replies: 4
Views: 4968

Re: Execute command every 5 min off multiple drives

It works. But I need some help on making the script for Task Scheduler. I'd like to add an entry in Task Scheduler, to run your code without any external script necessary (ie. have the entire script in one line added in task Scheduler). Hope that makes sence. For task Scheduler execution I only need...
by Olyrd
08 Apr 2016 10:49
Forum: DOS Batch Forum
Topic: Execute command every 5 min off multiple drives
Replies: 4
Views: 4968

Execute command every 5 min off multiple drives

I have some portable drives that I'd like to never spin-down, in other words make them impossible to sleep. The reason for this is to avoid some errors due to drive's firmware which puts the drive in sleep regardless of windows os settings. Expected result of the script : For each drive/partition th...
by Olyrd
08 Apr 2016 03:57
Forum: DOS Batch Forum
Topic: Printer IP Finder
Replies: 19
Views: 18983

Re: Printer IP Finder

Perfect! Full output is here: m However the too long errors are still there. The link above is the output of another computer, one that has 5 different printers installed. The script is very good however. @Compo Thanks for your observation. I'll have to test that on a machine with many printers to s...
by Olyrd
07 Apr 2016 11:56
Forum: DOS Batch Forum
Topic: Printer IP Finder
Replies: 19
Views: 18983

Re: Printer IP Finder

It works but in console it outputs: FINDSTR: Line 412 is too long. FINDSTR: Line 412 is too long. FINDSTR: Line 491 is too long. FINDSTR: Line 493 is too long. FINDSTR: Line 493 is too long. FINDSTR: Line 494 is too long. FINDSTR: Line 412 is too long. FINDSTR: Line 412 is too long. FINDSTR: Line 49...
by Olyrd
04 Apr 2016 14:39
Forum: DOS Batch Forum
Topic: Printer IP Finder
Replies: 19
Views: 18983

Re: Printer IP Finder

Set WshNetwork = WScript.CreateObject("WScript.Network") Set oPrinters = WshNetwork.EnumPrinterConnections For i = 0 to oPrinters.Count - 1 Step 2 WScript.Echo "Port " & oPrinters.Item(i) & " = " & oPrinters.Item(i+1) Next Outputs the following: m And that'...