Page 1 of 1

Adding underscore and suffix

PostPosted: Thu Sep 12, 2013 4:02 am
by tikistudio
Hi Guys,
I am trying to change a file in my C drive
Path is C:\abc123.txt
I want to add an underscore and adding a suffix to it, becoming abc_123_2300.txt
I went through the BRC_manual.pdf and come out with something like this

/DIR:"C:\new"
/INSERT:_:4
/SUFFIX:<_2300>

From the posts around this forum, mine seem to be too simple, which is not working.
I have no programming background, could someone guide me along? Thank you

/Dir:Path to files

PostPosted: Thu Sep 12, 2013 4:14 pm
by truth
/Dir":C:\new" only renames files within C:\new, not C:\

Re: Adding underscore and suffix

PostPosted: Fri Sep 13, 2013 4:11 am
by tikistudio
My apologises, the Path is C:\new\abc123.txt
I tried to double click my bat file, it doesn't change the filename.

Batch not processing?

PostPosted: Sat Sep 14, 2013 1:50 pm
by truth
Without seeing the entire batchline, I can only guess...
Possibilities include: file-matching, file-attributes, /execute-missing?

At your commandprompt, type the batchline (without /execute) to view predicted renames
Post back with details if you need anything more specific

Re: Adding underscore and suffix

PostPosted: Mon Sep 16, 2013 7:38 am
by tikistudio
Hi, I have tried doing this in another program but not using command line.
Image
Image

Non-BRC issue ...

PostPosted: Mon Sep 16, 2013 10:39 am
by truth
tikistudio wrote:Hi, I have tried doing this in another program but not using command line.

If you dont want to use BRC, thats fine - its your choice.
I understand your reluctance, but nothing gets renamed unless you type /execute

Re: Adding underscore and suffix

PostPosted: Tue Sep 17, 2013 6:39 am
by tikistudio
I would still like to use BRC, i'm just showing an example how I want it to be done.
If you could create a text file with a same file name, and showing me how it could be done.
That would be better than guessing.

For your info,
I create another bat file adding in the /execute
like this
/DIR:"C:\new"
/INSERT:_:4
/SUFFIX:<_2300>
/execute

and nothing happens

Test from command-prompt to preview errors / results

PostPosted: Tue Sep 17, 2013 9:30 am
by truth
Well obviously something happens, you just dont know what, because you hid it in a batch
Step 1: Always test (without /execute) from the command-prompt to preview results/errors
Only then should you consider putting it in a batch with /execute

Assuming your entire batchline is:
brc32 /dir:C:\new /insert:_:4 /suffix:<_2300> /execute... The suffix is invalid

Try the below instead from your command-prompt
brc32 /dir:C:\new /insert:_:4 /suffix:_2300

Although your syntax was incorrect, its only 1 of many reasons for 'and nothing happens'
Typing from the command-prompt will always return the relevant errors, eliminating guesswork
If you cant access the prompt, add @cmd /k to your batch, to hold it open long enough to see the output