- Aug
- 30
- 0
Change percent-sign to anything-else in filename passed as a parameter.
This started out with "%20" in filenames. I KNOW that 0x20 is the hex code for a space, but I want to know how to change any percent-sign into any standard/printable character(s) so I can analyze the file's contents within TCC or a third-party application. Basically, I want to
change filename
before %in after.png
to
before anything after.png
or
anything.png
within the BTM file, or copy the pre-filename to the post-filename so I can analyze that in lieu of the actual filename. There were two cases that I tried:
Case 1 - the filename is passed directly as a parameter like
Analyze.btm "PATH\before %in after.png"
Case 2 - the string "before %in after.png" (without the "s) is the first line (line 0) in a file, e.g., "Analyze.txt", and the command is
Analyze.btm "PATH\Analyze.txt"
All I can get out of Analyze.btm is an analysis of
"PATH\before after.png"
which doesn't exist.
I've tried
=================
setdos /x-3 and -4
%@replace[SeeNote1,SeeNote2,SeeNote3] -and- "%@replace[SeeNote1,SeeNote2,SeeNote3]"
Note1: %% ^% \%
Note2: %%%% ^% ^%% ^%%%
using_a_text_string_still_has_the_same_results
Note3: %1 "%1" %@line[%1,0] "%@line[%1,0]"
%@line["%1",0] "%@line["%1",0]"
copy "%@line["%1",0]" anything.png
=================
Again, all I can get out of Analyze.btm is an analysis of
"PATH\before after.png"
which doesn't exist. This happens even when the "to" in the 'replace' function (Note2) is a simple lower-case alpha like
asdfg
I played with ffind and sed for awhile, but they didn't work either.
Well?
This started out with "%20" in filenames. I KNOW that 0x20 is the hex code for a space, but I want to know how to change any percent-sign into any standard/printable character(s) so I can analyze the file's contents within TCC or a third-party application. Basically, I want to
change filename
before %in after.png
to
before anything after.png
or
anything.png
within the BTM file, or copy the pre-filename to the post-filename so I can analyze that in lieu of the actual filename. There were two cases that I tried:
Case 1 - the filename is passed directly as a parameter like
Analyze.btm "PATH\before %in after.png"
Case 2 - the string "before %in after.png" (without the "s) is the first line (line 0) in a file, e.g., "Analyze.txt", and the command is
Analyze.btm "PATH\Analyze.txt"
All I can get out of Analyze.btm is an analysis of
"PATH\before after.png"
which doesn't exist.
I've tried
=================
setdos /x-3 and -4
%@replace[SeeNote1,SeeNote2,SeeNote3] -and- "%@replace[SeeNote1,SeeNote2,SeeNote3]"
Note1: %% ^% \%
Note2: %%%% ^% ^%% ^%%%
using_a_text_string_still_has_the_same_results
Note3: %1 "%1" %@line[%1,0] "%@line[%1,0]"
%@line["%1",0] "%@line["%1",0]"
copy "%@line["%1",0]" anything.png
=================
Again, all I can get out of Analyze.btm is an analysis of
"PATH\before after.png"
which doesn't exist. This happens even when the "to" in the 'replace' function (Note2) is a simple lower-case alpha like
asdfg
I played with ffind and sed for awhile, but they didn't work either.
Well?