Hello TSG Development----
THANKS for your advise, time, and help!!!!
It's been a long time since I have done DOS Batch file development and I cannot remember if the following can even be done with a DOS BATCH command line.
The problem solution is probably simple:
What DOS command line logic is required to prefix a string to records on a file.
And, this is where my rememberance of DOS command line falls short----How to get the string, any string added to the front of each record on a filename.txt file.
DETAILS:
The concept is to RENAME files using a pattern matching type technique, using the full filename (>8.3), a filename that contains a SPACE character as part of the filename, and in batch.
The following processes have been reviewed and many work as required, but the ones that do work as required do not allow full batch execution of the process to rename the files as required.
REVIEWED RENAMERS
-4A RENAME
ANT RENAMER
AF5 Rename
ARen
BATCH RENAMER
BATCH FILE
RENAMER
BETTER FILE RENAMER
BULK FILE RENAMER
D-FILEMU
D3v2
EXIFREN
FILE RENAMER(PC or MAC)
FREN2005
LUPAS RENAME 2000
RENAME-IT
RENAMEALL
RENAMIT
RENAMESTAR
SIREN
SPACE-B-GONE
WITRENAMER
Tried using the following CHOICE command to create a bat file to be executed recusivley with the full filename, plus a SPACE in the filename. However, using the following CHOICE command on a filename that contains a SPACE will create the output file, but the CHOICE command never returns to execute the .b.bat. And, it is interesting that the characters of the filename that are after the SPACE are first on the output file with no comma delimiters and the leading characters up to the SPACE are last on the output file and are delimited with commas, with the contents of the %0 argument in the middle.
> .\b.bat echo;;|choice/c?%filename%; %0;
.b.bat
Using the above CHOICE command on a full filename with no SPACE will return to execute the .b.bat file as expected. Plus the b.bat file contains the characters of the full filename delimited with commas as expected and the %0 is on the front of the comma delimited full filename string.
Also, using the FOR IN (SET),,,, to load the above %filename% only provided the 8.3 format.
I am now working with the following command:
ATTRIB > Fullfilename.txt
The records created to Fullfilename.txt by ATTRIB contains the required FULL FILENAME (>8.3 convention), while using the FOR %%X IN (SET) DO,,, provides only the 8.3 convention.
The command line ATTRIB > Fullfilname.txt creates the following records to Fullfilename.txt including the SPACE in the Fullfilename:
Note: The SPACE character is between the } and ( characters as in
,,,,04-19} (2),,,,,,etc.
A {2005-~2.WAV C:\jlong\filere~1\d-filemu\{2005-04-19} (2).abc
A {2005-~3.WAV C:\jlong\filere~1\d-filemu\{2005-04-19} (3).abc
A {2005-~4.WAV C:\jlong\filere~1\d-filemu\{2005-04-19} (4).abc
What I would like to create to the Fullfilename.txt is the following or anything that is similar, or any command line sequence that would output this to some file executed recursivley, until all records (files) are processed, etc.:
RMSPACE A {2005-~2.WAV C:\jlong\filere~1\d-filemu\{2005-04-19} (2).abc
RMSPACE A {2005-~3.WAV C:\jlong\filere~1\d-filemu\{2005-04-19} (3).abc
RMSPACE A {2005-~4.WAV C:\jlong\filere~1\d-filemu\{2005-04-19} (4).abc
The SPACE(s) in the above created Fullfilename.txt act as a delimiter in a DOS call sequence and thus logic in DOS can be used to rebuild the filename (removing the SPACE). For example, using the records above by combining the %3 and the %4 arguments. And, once the file is renamed to remove the SPACE the CHOICE command can be used on the new file name to put the comma delimeters between each character.
I have tried to modify the
ATTRIB>Fullfilename.txt
using the
FOR %%x IN (SET) DO,,,,
but, I cannot get the string "CALL RMSPACE " added to the front of each record created to Fullfilename.txt.
If this is possible using DOS command line, the above filename Fullfilename.txt will be changed to a .bat file convention and then executed.
Further logic can then be used to remove selectable characters from the comma seperated filename to RENAME the original filename to something like the following:
0504192.abc
0504193.abc
0504194.abc
Maybe, it cannot be done at all in a DOS Command line batch file(????),,,, I just cannot remember!!! ;-|
THANKS for your time, help, and advise!!!!!
Jerry