How to remove end of file names?Delete first part of file namesHow can I batch convert folder names from one date format to anotherHow to remove a number from file names?Recursive rename to remove the end of multiple filenames in a folderRenaming multiple files with complex numbered nameschange many file names to hash (sha256)?zero padding of file names
Is the net charge on a capacitor zero? If yes, then why?
What's the greatest number of hands I can have to annoy my mother-in-law with?
Number of Matrices having determinant 1
Is it possible to kill parasitic worms by intoxicating oneself?
I am ask to complete my withdrawal transaction with COT fee of 1200 dollars
What is a word for "atom or molecule"?
Can the President be impeached twice?
How to optimise the use of 10 nuclear fuel pellets in medieval period?
What is the narrative difference between a Charisma and Wisdom saving throw?
Is it possible for nature to create bubble wrap?
Can someone hack my phone by sending me a file (e.g. PDF) via Whatsapp?
Is Kirk’s comment about “LDS” intended to be a religious joke?
How to prevent discontent among the players when one player murders the others' characters?
Sudden cheap travel?
Why is there a preference to use the cumulative distribution function to characterise a random variable instead of the probability density function?
How to correctly export env variables containing spaces in ZSH
Predicting y from log y as the dependent variable
How can I know if two distributions have the same mean and standard deviation?
What does "x employee is no longer employed by XYZ company" mean?
I've never seen this before. Is this primarily a "rote computational trick" for multiplication by 9 ...?
Why are bicycle tires incapable of maintaining pressure over time, while car tyres seem to have less of a problem?
Was a four year-old forced to sleep on the floor of Leeds General Infirmary?
Sorting marbles based on weightings
Will the same JavaScript fetched by HTTP and HTTPS be cached separately by the browser?
How to remove end of file names?
Delete first part of file namesHow can I batch convert folder names from one date format to anotherHow to remove a number from file names?Recursive rename to remove the end of multiple filenames in a folderRenaming multiple files with complex numbered nameschange many file names to hash (sha256)?zero padding of file names
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I want to rename a lot of files like 1_16_video1.mp4?1578683110081
& 54_127_video7.mp4?168302
to 1_16_video1.mp4
& 54_127_video7.mp4
.
How can I rename them?
bash rename mv filename
add a comment
|
I want to rename a lot of files like 1_16_video1.mp4?1578683110081
& 54_127_video7.mp4?168302
to 1_16_video1.mp4
& 54_127_video7.mp4
.
How can I rename them?
bash rename mv filename
rename
allows the use of regex, but have you haven't said what part you want to rename, and what to.
– guiverc
Oct 1 at 7:58
@guiverc I want to remove the numbers after themp4
suffix. Look at the names precisely.
– Mohammad Kholghi
Oct 1 at 8:01
add a comment
|
I want to rename a lot of files like 1_16_video1.mp4?1578683110081
& 54_127_video7.mp4?168302
to 1_16_video1.mp4
& 54_127_video7.mp4
.
How can I rename them?
bash rename mv filename
I want to rename a lot of files like 1_16_video1.mp4?1578683110081
& 54_127_video7.mp4?168302
to 1_16_video1.mp4
& 54_127_video7.mp4
.
How can I rename them?
bash rename mv filename
bash rename mv filename
asked Oct 1 at 7:55
Mohammad KholghiMohammad Kholghi
5734 silver badges21 bronze badges
5734 silver badges21 bronze badges
rename
allows the use of regex, but have you haven't said what part you want to rename, and what to.
– guiverc
Oct 1 at 7:58
@guiverc I want to remove the numbers after themp4
suffix. Look at the names precisely.
– Mohammad Kholghi
Oct 1 at 8:01
add a comment
|
rename
allows the use of regex, but have you haven't said what part you want to rename, and what to.
– guiverc
Oct 1 at 7:58
@guiverc I want to remove the numbers after themp4
suffix. Look at the names precisely.
– Mohammad Kholghi
Oct 1 at 8:01
rename
allows the use of regex, but have you haven't said what part you want to rename, and what to.– guiverc
Oct 1 at 7:58
rename
allows the use of regex, but have you haven't said what part you want to rename, and what to.– guiverc
Oct 1 at 7:58
@guiverc I want to remove the numbers after the
mp4
suffix. Look at the names precisely.– Mohammad Kholghi
Oct 1 at 8:01
@guiverc I want to remove the numbers after the
mp4
suffix. Look at the names precisely.– Mohammad Kholghi
Oct 1 at 8:01
add a comment
|
2 Answers
2
active
oldest
votes
Using bash for
loop and parameter expansion:
for i in *.mp4*; do
mv "$i" "$i%?*"
done
The parameter expansion is mentioned in the man page as
$parameter%word Remove matching suffix pattern.
It removes everything after the last ?
included.
add a comment
|
sudo apt install krusader
sudo apt install krename
start krusader, highlight which files, or 'select all', 'file multirename' , click 'insert part of filename' button, swipe over the part and carefully check if the results are what you want before proceeding.
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/4.0/"u003ecc by-sa 4.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%2f1177838%2fhow-to-remove-end-of-file-names%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Using bash for
loop and parameter expansion:
for i in *.mp4*; do
mv "$i" "$i%?*"
done
The parameter expansion is mentioned in the man page as
$parameter%word Remove matching suffix pattern.
It removes everything after the last ?
included.
add a comment
|
Using bash for
loop and parameter expansion:
for i in *.mp4*; do
mv "$i" "$i%?*"
done
The parameter expansion is mentioned in the man page as
$parameter%word Remove matching suffix pattern.
It removes everything after the last ?
included.
add a comment
|
Using bash for
loop and parameter expansion:
for i in *.mp4*; do
mv "$i" "$i%?*"
done
The parameter expansion is mentioned in the man page as
$parameter%word Remove matching suffix pattern.
It removes everything after the last ?
included.
Using bash for
loop and parameter expansion:
for i in *.mp4*; do
mv "$i" "$i%?*"
done
The parameter expansion is mentioned in the man page as
$parameter%word Remove matching suffix pattern.
It removes everything after the last ?
included.
answered Oct 1 at 8:10
olivoliv
4102 silver badges7 bronze badges
4102 silver badges7 bronze badges
add a comment
|
add a comment
|
sudo apt install krusader
sudo apt install krename
start krusader, highlight which files, or 'select all', 'file multirename' , click 'insert part of filename' button, swipe over the part and carefully check if the results are what you want before proceeding.
add a comment
|
sudo apt install krusader
sudo apt install krename
start krusader, highlight which files, or 'select all', 'file multirename' , click 'insert part of filename' button, swipe over the part and carefully check if the results are what you want before proceeding.
add a comment
|
sudo apt install krusader
sudo apt install krename
start krusader, highlight which files, or 'select all', 'file multirename' , click 'insert part of filename' button, swipe over the part and carefully check if the results are what you want before proceeding.
sudo apt install krusader
sudo apt install krename
start krusader, highlight which files, or 'select all', 'file multirename' , click 'insert part of filename' button, swipe over the part and carefully check if the results are what you want before proceeding.
answered Oct 2 at 6:48
pierrelypierrely
1435 bronze badges
1435 bronze badges
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%2f1177838%2fhow-to-remove-end-of-file-names%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
rename
allows the use of regex, but have you haven't said what part you want to rename, and what to.– guiverc
Oct 1 at 7:58
@guiverc I want to remove the numbers after the
mp4
suffix. Look at the names precisely.– Mohammad Kholghi
Oct 1 at 8:01