Search found 8 matches

by d360991
25 Nov 2012 22:46
Forum: DOS Batch Forum
Topic: Randomly selected subset of lines from a text file
Replies: 1
Views: 2809

Randomly selected subset of lines from a text file

Folks, I've done a lot of research and cannot seem to determine how to write a simple batch file that will select a subset of all the lines in a text file and echos on the screen. I am thinking of the following three steps: For each line in a text file { Generate random number If random number < tre...
by d360991
12 Nov 2012 20:40
Forum: DOS Batch Forum
Topic: Listing and opening files with filename selection filter
Replies: 1
Views: 2455

Listing and opening files with filename selection filter

Folks, In a particular folder, I have a collection of files with dates as prefixes in the filenames. E.g.: 20121024 - file1.txt 20121028 - file2.jpg 20121112 - file3.docx 20121114 - file4.txt 20121127 - file5.xlsx I would like to open only those files that have as prefix a date that is today or befo...
by d360991
22 Mar 2012 07:31
Forum: DOS Batch Forum
Topic: Writing a batch file to open Recycle Bin or Control Panel
Replies: 11
Views: 22619

Re: Writing a batch file to open Recycle Bin or Control Pane

tonysathre wrote:On Windows 7:

start c:\$RECYCLE.BIN


Sorry, on Windows 7, "start c:\$RECYCLE.BIN" doesn't seem to open the Windows recycle bin.
by d360991
22 Mar 2012 07:24
Forum: DOS Batch Forum
Topic: Resetting the incoming parameter in a batch file
Replies: 3
Views: 5348

Re: Resetting the incoming parameter in a batch file

OK. How do I incorporate the SHIFT command in my little batch file using an "IF" statement. In other words, what would my batch file in the OP look like?

Thanks very much,
-Nina
by d360991
22 Mar 2012 07:22
Forum: DOS Batch Forum
Topic: Writing a batch file to open Recycle Bin or Control Panel
Replies: 11
Views: 22619

Re: Writing a batch file to open Recycle Bin or Control Pane

This is so simple. Great.

On Windows 7, is it possible to open different elements of the control panel via batch files? For example, Scheduled Tasks?

Thanks again,
-Nina
by d360991
22 Mar 2012 05:52
Forum: DOS Batch Forum
Topic: Resetting the incoming parameter in a batch file
Replies: 3
Views: 5348

Resetting the incoming parameter in a batch file

I'd like to write a batch file that called "listfiles.bat" which takes an optional parameter for a filter to list files. So, if a parameter is passed, I want my batchfile to do a dir "*parameter*.*." If no parameter is passed, I want my batchfile to do a "dir *.*" Anoth...
by d360991
22 Mar 2012 05:51
Forum: DOS Batch Forum
Topic: Writing a batch file to open Recycle Bin or Control Panel
Replies: 11
Views: 22619

Writing a batch file to open Recycle Bin or Control Panel

Is it possible to launch Windows Explorer in Recycle Bin or Control Panel? Something like:

"C:\Windows\explorer.exe" "Recycle Bin"

"C:\Windows\explorer.exe" "Control Panel"

Thanks,
-Nina
by d360991
18 Mar 2012 13:16
Forum: DOS Batch Forum
Topic: Like UNIX ampersand: launch documents and close batch file
Replies: 2
Views: 3304

Like UNIX ampersand: launch documents and close batch file

I'd like to open a bunch of documents (.txt or .docx or .ppt) using a batch file. Therefore, I have a batch file with the following structure: "filename1.txt" & "filename2.txt" & If my text editor is open, this batch file will open the .txt files in the text editor and th...