Delete text in file name or extension
Delete text inside file
Delete between text
Save to /Shortcuts/Delete text
Save to specific folder
Make folder
Created by me
What's New
Version 1.5
Few changes
What it does
236 actions-
Choose from MenuDelete text
-
Choose from Menudelete in file extension
-
Ask for InputDelete what text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Text from Input
-
Set VariableGet text
-
Get Details of Files
-
Set VariableExtension
-
Get Name
-
Set VariableName
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menudelete in file name
-
Ask for InputDelete what text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Text from Input
-
Set VariableGet text
-
Get Details of Files
-
Set VariableExtension
-
Get Name
-
Set VariableName
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menudelete inside file
-
Ask for InputDelete what text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Text from Input
-
Set VariableGet text
-
Get Details of Files
-
Set VariableExtension
-
Get Name
-
Set VariableName
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menudelete between what options
-
Choose from MenuDelete between what
-
Choose from Menuboth sides of text
-
Ask for InputLook For what on left & right side of text
-
Set VariableBoth sides of text
-
Ask for InputDelete what between both sides of text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menuboth sides of text (no space)
-
Ask for InputLook For what on left & right side of text
-
Set VariableBoth sides of text
-
Ask for InputDelete what between both sides of text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menutwo different sides of text
-
Ask for InputLook for what on left side of text
-
Set VariableLeft side of text
-
Ask for InputLook for what on right side of text
-
Set VariableRight side of text
-
Ask for InputDelete what between left & right side of text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menutwo different sides of text (no space)
-
Ask for InputLook for what on left side of text
-
Set VariableLeft side of text
-
Ask for InputLook for what on right side of text
-
Set VariableRight side of text
-
Ask for InputDelete what between left & right side of text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menucreate folder
-
Ask for Inputset folder name to use
-
Set VariableFolder name
-
Create Folder
-
Show Result
-
Stop This Shortcut
-
Choose from Menusave options
-
Choose from MenuDelete text save options
-
Choose from Menudelete in file name
-
Ask for InputDelete what text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Text from Input
-
Set VariableGet text
-
Get Details of Files
-
Set VariableExtension
-
Get Name
-
Set VariableName
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menudelete in file extension
-
Ask for InputDelete what text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Text from Input
-
Set VariableGet text
-
Get Details of Files
-
Set VariableExtension
-
Get Name
-
Set VariableName
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menudelete inside file
-
Ask for InputDelete what text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Text from Input
-
Set VariableGet text
-
Get Details of Files
-
Set VariableExtension
-
Get Name
-
Set VariableName
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menudelete between what options
-
Choose from MenuDelete between what save options
-
Choose from Menuboth sides of text
-
Ask for InputLook For what on left & right side of text
-
Set VariableBoth sides of text
-
Ask for InputDelete what between both sides of text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menuboth sides of text (no space)
-
Ask for InputLook For what on left & right side of text
-
Set VariableBoth sides of text
-
Ask for InputDelete what between both sides of text
-
Set VariableDelete text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
If
-
Replace Text
-
Text
-
Set Name
-
Choose from Menutwo different sides of text
-
Ask for InputLook for what on left side of text
-
Set VariableLeft side of text
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/text'
#define color darkblue
#define glyph magicWandAlt
menu "Delete text" {
item "delete in file name":
prompt("Delete what text")
@DeleteText
const File = getFileFromFolder(, "")
for _ in File {
getText(@RepeatItem)
@GetText
getFileDetail(nil, "File Extension")
@Extension
getName(@RepeatItem)
@Name
if @Extension contains @DeleteText {
replaceText(@DeleteText, "", @Extension)
const Text = "{@GetText}"
setName(Text, "{@Name}.{}")
}
}
item "delete in file extension":
prompt("Delete what text")
@DeleteText
const File1 = getFile("")
for _ in File1 {
getText(@RepeatItem)
@GetText
getFileDetail(nil, "File Extension")
@Extension
getName(@RepeatItem)
@Name
if @Name contains @DeleteText {
replaceText(@DeleteText, "", @Name)
const Text1 = "{@GetText}"
setName(Text1, "{}.{@Extension}")
}
}
item "delete inside file":
prompt("Delete what text")
@DeleteText
const File2 = getFile("")
for _ in File2 {
getText(@RepeatItem)
@GetText
getFileDetail(nil, "File Extension")
@Extension
getName(@RepeatItem)
@Name
if @GetText contains @DeleteText {
replaceText(@DeleteText, "", @GetText)
const Text2 = "{}"
setName(Text2, "{@Name}.{@Extension}")
}
}
item "delete between what options":
menu "Delete between what" {
item "both sides of text":
prompt("Look For what on left & right side of text")
@BothSidesOfText
prompt("Delete what between both sides of text")
@DeleteText
const File3 = getFile("")
for _ in File3 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@BothSidesOfText}.*) {@DeleteText} (.*.*\{@BothSidesOfText})", "$1 $2", @GetText, true)
const Text3 = "{}"
setName(Text3, @Name)
}
}
item "both sides of text (no space)":
prompt("Look For what on left & right side of text")
@BothSidesOfText
prompt("Delete what between both sides of text")
@DeleteText
const File3 = getFile("")
for _ in File3 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@BothSidesOfText}.*){@DeleteText}(.*.*\{@BothSidesOfText})", "$1$2", @GetText, true)
const Text3 = "{}"
setName(Text3, @Name)
}
}
item "two different sides of text":
prompt("Look for what on left side of text")
@LeftSideOfText
prompt("Look for what on right side of text")
@RightSideOfText
prompt("Delete what between left & right side of text")
@DeleteText
const File4 = getFile("")
for _ in File4 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@LeftSideOfText}.*) {@DeleteText} (.*.*\{@RightSideOfText})", "$1 $2", @GetText, true)
const Text4 = "{}"
setName(Text4, @Name)
}
}
item "two different sides of text (no space)":
prompt("Look for what on left side of text")
@LeftSideOfText
prompt("Look for what on right side of text")
@RightSideOfText
prompt("Delete what between left & right side of text")
@DeleteText
const File4 = getFile("")
for _ in File4 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@LeftSideOfText}.*){@DeleteText}(.*.*\{@RightSideOfText})", "$1$2", @GetText, true)
const Text4 = "{}"
setName(Text4, @Name)
}
}
}
item "create folder":
prompt("set folder name to use")
@FolderName
createFolder(@FolderName)
show("New folder is /Shortcuts/{@FolderName}")
stop()
item "save options":
menu "Delete text save options" {
item "delete in file name":
prompt("Delete what text")
@DeleteText
const File1 = getFile("")
for _ in File1 {
getText(@RepeatItem)
@GetText
getFileDetail(nil, "File Extension")
@Extension
getName(@RepeatItem)
@Name
if @Name contains @DeleteText {
replaceText(@DeleteText, "", @Name)
const Text1 = "{@GetText}"
setName(Text1, "{}.{@Extension}")
}
}
item "delete in file extension":
prompt("Delete what text")
@DeleteText
const File5 = getFile("")
for _ in File5 {
getText(@RepeatItem)
@GetText
getFileDetail(nil, "File Extension")
@Extension
getName(@RepeatItem)
@Name
if @Extension contains @DeleteText {
replaceText(@DeleteText, "", @Extension)
const Text = "{@GetText}"
setName(Text, "{@Name}.{}")
}
}
item "delete inside file":
prompt("Delete what text")
@DeleteText
const File2 = getFile("")
for _ in File2 {
getText(@RepeatItem)
@GetText
getFileDetail(nil, "File Extension")
@Extension
getName(@RepeatItem)
@Name
if @GetText contains @DeleteText {
replaceText(@DeleteText, "", @GetText)
const Text2 = "{}"
setName(Text2, "{@Name}.{@Extension}")
}
}
item "delete between what options":
menu "Delete between what save options" {
item "both sides of text":
prompt("Look For what on left & right side of text")
@BothSidesOfText
prompt("Delete what between both sides of text")
@DeleteText
const File3 = getFile("")
for _ in File3 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@BothSidesOfText}.*) {@DeleteText} (.*.*\{@BothSidesOfText})", "$1 $2", @GetText, true)
const Text3 = "{}"
setName(Text3, @Name)
}
}
item "both sides of text (no space)":
prompt("Look For what on left & right side of text")
@BothSidesOfText
prompt("Delete what between both sides of text")
@DeleteText
const File6 = getFile("")
for _ in File6 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@BothSidesOfText}.*){@DeleteText}(.*.*\{@BothSidesOfText})", "$1$2", @GetText, true)
const Text3 = "{}"
setName(Text3, @Name)
}
}
item "two different sides of text":
prompt("Look for what on left side of text")
@LeftSideOfText
prompt("Look for what on right side of text")
@RightSideOfText
prompt("Delete what between left & right side of text")
@DeleteText
const File4 = getFile("")
for _ in File4 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@LeftSideOfText}.*) {@DeleteText} (.*.*\{@RightSideOfText})", "$1 $2", @GetText, true)
const Text4 = "{}"
setName(Text4, @Name)
}
}
item "two different sides of text (no space)":
prompt("Look for what on left side of text")
@LeftSideOfText
prompt("Look for what on right side of text")
@RightSideOfText
prompt("Delete what between left & right side of text")
@DeleteText
const File4 = getFile("")
for _ in File4 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
if @GetText contains @DeleteText {
replaceText("(\{@LeftSideOfText}.*){@DeleteText}(.*.*\{@RightSideOfText})", "$1$2", @GetText, true)
const Text4 = "{}"
setName(Text4, @Name)
}
}
}
}
const SavedFile = saveFilePrompt(MenuResult)
stop()
}
createFolder("Delete text")
saveFile("Delete text", MenuResult1, true)
show("In folder /Shortcuts/Delete text")
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by hunter9888x
You Might Also Like
Advertisement