Changing file extension
I have about 1000 images saved in a weird way.
"file_name".jpeg?image=%2Fmars%2Freadonly%2Fthemis%2Fpds%2FODTGEO_v2%2Fbrowse%2Fodtbws2_0050%2Fv545xxbws2%2FV54577010POL.png&rotate=0&format=jpeg
I want to convert all of the files into just .jpeg
.
What command do I use?
files file-format
add a comment |
I have about 1000 images saved in a weird way.
"file_name".jpeg?image=%2Fmars%2Freadonly%2Fthemis%2Fpds%2FODTGEO_v2%2Fbrowse%2Fodtbws2_0050%2Fv545xxbws2%2FV54577010POL.png&rotate=0&format=jpeg
I want to convert all of the files into just .jpeg
.
What command do I use?
files file-format
1
You want to remove the part from?
till the end?
– George Udosen
Jan 8 at 17:21
yeah exactly just have them all as .jpeg
– Pruthvi Acharya
Jan 8 at 17:51
add a comment |
I have about 1000 images saved in a weird way.
"file_name".jpeg?image=%2Fmars%2Freadonly%2Fthemis%2Fpds%2FODTGEO_v2%2Fbrowse%2Fodtbws2_0050%2Fv545xxbws2%2FV54577010POL.png&rotate=0&format=jpeg
I want to convert all of the files into just .jpeg
.
What command do I use?
files file-format
I have about 1000 images saved in a weird way.
"file_name".jpeg?image=%2Fmars%2Freadonly%2Fthemis%2Fpds%2FODTGEO_v2%2Fbrowse%2Fodtbws2_0050%2Fv545xxbws2%2FV54577010POL.png&rotate=0&format=jpeg
I want to convert all of the files into just .jpeg
.
What command do I use?
files file-format
files file-format
edited Jan 8 at 17:26
Kulfy
4,29651442
4,29651442
asked Jan 8 at 17:16
Pruthvi AcharyaPruthvi Acharya
1
1
1
You want to remove the part from?
till the end?
– George Udosen
Jan 8 at 17:21
yeah exactly just have them all as .jpeg
– Pruthvi Acharya
Jan 8 at 17:51
add a comment |
1
You want to remove the part from?
till the end?
– George Udosen
Jan 8 at 17:21
yeah exactly just have them all as .jpeg
– Pruthvi Acharya
Jan 8 at 17:51
1
1
You want to remove the part from
?
till the end?– George Udosen
Jan 8 at 17:21
You want to remove the part from
?
till the end?– George Udosen
Jan 8 at 17:21
yeah exactly just have them all as .jpeg
– Pruthvi Acharya
Jan 8 at 17:51
yeah exactly just have them all as .jpeg
– Pruthvi Acharya
Jan 8 at 17:51
add a comment |
1 Answer
1
active
oldest
votes
I don't fully follow your quest but I have this little script that can return the filename without that long part but retains the "
quotes and I suspect that some of those files have spaces in their names so they might have to stay.
for i in /path/to/files/*; do mv "$(realpath $i)" "$(realpath "${i%%?*}"); done
Result:
"file_name".jpeg
Note: I couldn't create a sample with that name so I used a varaible in a script.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108062%2fchanging-file-extension%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't fully follow your quest but I have this little script that can return the filename without that long part but retains the "
quotes and I suspect that some of those files have spaces in their names so they might have to stay.
for i in /path/to/files/*; do mv "$(realpath $i)" "$(realpath "${i%%?*}"); done
Result:
"file_name".jpeg
Note: I couldn't create a sample with that name so I used a varaible in a script.
add a comment |
I don't fully follow your quest but I have this little script that can return the filename without that long part but retains the "
quotes and I suspect that some of those files have spaces in their names so they might have to stay.
for i in /path/to/files/*; do mv "$(realpath $i)" "$(realpath "${i%%?*}"); done
Result:
"file_name".jpeg
Note: I couldn't create a sample with that name so I used a varaible in a script.
add a comment |
I don't fully follow your quest but I have this little script that can return the filename without that long part but retains the "
quotes and I suspect that some of those files have spaces in their names so they might have to stay.
for i in /path/to/files/*; do mv "$(realpath $i)" "$(realpath "${i%%?*}"); done
Result:
"file_name".jpeg
Note: I couldn't create a sample with that name so I used a varaible in a script.
I don't fully follow your quest but I have this little script that can return the filename without that long part but retains the "
quotes and I suspect that some of those files have spaces in their names so they might have to stay.
for i in /path/to/files/*; do mv "$(realpath $i)" "$(realpath "${i%%?*}"); done
Result:
"file_name".jpeg
Note: I couldn't create a sample with that name so I used a varaible in a script.
edited Jan 8 at 18:15
answered Jan 8 at 17:56
George UdosenGeorge Udosen
20.6k94568
20.6k94568
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108062%2fchanging-file-extension%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
You want to remove the part from
?
till the end?– George Udosen
Jan 8 at 17:21
yeah exactly just have them all as .jpeg
– Pruthvi Acharya
Jan 8 at 17:51