Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

5 Problem Suppose you have a camera that names it\'s images with the word \'imag

ID: 3597463 • Letter: 5

Question

5 Problem Suppose you have a camera that names it's images with the word 'image' followed by a 10 digit random number, followed by a dash and the date. For example: image3874319230-160908.jpg where the 160908 means the image was created on the 16th of September, 2018. You don't like the 10 digit random number in there and would rather have the images just named by the date. So that, for example, the file above would be called 160908.jpe write a command line shell script which will rename all of the .jpg files in the current directory to get rid of the stuff you don't want as in the example above.

Explanation / Answer

The following command will give you the required output

ren "image*.jpg" "////////////////*.jpg"

Use the number of / = number of characters in name to be removed

This command works in windows cmd and has been tested.

Please do upvote this answer by giving a thumbs up.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote