Using a variable that's part of a filename to open that file
Posted: 25 Jun 2012 23:23
I'm not too smart in batch files.
If you have an idea that I can 'grow' with that would be fine!
Here's the basics of it:
I'll want to use a variable when typing into Run field this way:
C PLASTIC
Where typing PLASTIC would open PLASTIC.RTF
typing
C PLASTIC will open PLASTIC.COMMENT.RTF
---------------
The BATCH files I have only open text files.
e.g. Typing PLASTIC opens 'PLASTIC.RTF'
We'll call those the old text files I've had for years. The new text files will be the same names
except they'll have
.COMMENT
added to the name.
Another way to say that:
Their names will be names that I already have on other text files and with .COMMENT inserted into the name.
e.g PLASTIC.RTF gets a 'brother' and his file name is PLASTIC.COMMENTS.RTF
I'll want to use a variable when typing into Run field this way:
C PLASTIC
Where typing PLASTIC would open PLASTIC.RTF
typing
C PLASTIC will open PLASTIC.COMMENT.RTF
(1)
; Batch File Name 'PLASTIC.bat'
@echo off
start "D:\Program Files\Cwordpad\CWordPad.exe" "c:\Users\Acer1\Documents\PLASTIC.rtf"
If you have an idea that I can 'grow' with that would be fine!
Here's the basics of it:
I'll want to use a variable when typing into Run field this way:
C PLASTIC
Where typing PLASTIC would open PLASTIC.RTF
typing
C PLASTIC will open PLASTIC.COMMENT.RTF
---------------
The BATCH files I have only open text files.
e.g. Typing PLASTIC opens 'PLASTIC.RTF'
We'll call those the old text files I've had for years. The new text files will be the same names
except they'll have
.COMMENT
added to the name.
Another way to say that:
Their names will be names that I already have on other text files and with .COMMENT inserted into the name.
e.g PLASTIC.RTF gets a 'brother' and his file name is PLASTIC.COMMENTS.RTF
I'll want to use a variable when typing into Run field this way:
C PLASTIC
Where typing PLASTIC would open PLASTIC.RTF
typing
C PLASTIC will open PLASTIC.COMMENT.RTF
(1)
; Batch File Name 'PLASTIC.bat'
@echo off
start "D:\Program Files\Cwordpad\CWordPad.exe" "c:\Users\Acer1\Documents\PLASTIC.rtf"