How to add new text and an empty space before a file name with Automator
I can create a new service to add to multiple files some text before the file name but I need to add even an empty space; e.g. file name original becomes: new text(space)file name original. The aim is to add this text and space to multiple files.
I hope to be understood. Please can somebody help me?
Thanks
This is an old Apple-supplied AppleScript that will do the job.
IMPORTANT: note the conditions of use: it will choose the frontmost Finder window to operate on. Therefore, open the folder you want to change the names of and make it the front finder window BEFORE running the script.
Add to File Names
This script is designed to add a prefix or suffix to files in the front window of the desktop.
If no folder windows are open, the script will affect items on the desktop.
Copyright © 2001–2007 Apple Inc.
You may incorporate this Apple sample code into your program(s) without
restriction. This Apple sample code has been provided "AS IS" and the
responsibility for its operation is yours. You are not permitted to
redistribute this Apple sample code as "Apple sample code" after having
made changes. If you're going to redistribute the code, we require
that you make it clear that the code was descended from Apple sample
code, but that you've made changes.
--March 2014: Changes by Phil Stokes to make the script work on 10.9
--these changes are simply reversing the order of parameters in the lines that have "copy" in them
-- The following line is disabled due to a Menu Manager bug
--set the source_folder to (choose folder with prompt "Pick the folder containing the files to rename:")
try
tell application "Finder" to set the source_folder to (folder of the front window) as alias
on error -- no open folder windows
set the source_folder to path to desktop folder as alias
end try
set the prefix_or_suffix to ""
repeat
display dialog "Enter the prefix or suffix to use:" default answer the prefix_or_suffix buttons {"Cancel", "Prefix", "Suffix"}
copy the result as list to {button_pressed, prefix_or_suffix}
if the prefix_or_suffix is not "" then exit repeat
end repeat
set the item_list to list folder source_folder without invisibles
set source_folder to source_folder as string
repeat with i from 1 to number of items in the item_list
set this_item to item i of the item_list
set this_item to (source_folder & this_item) as alias
set this_info to info for this_item
set the current_name to the name of this_info
if folder of this_info is false and ¬
alias of this_info is false then
if the button_pressed is "Prefix" then
set the new_file_name to the (the prefix_or_suffix & the current_name) as string
else
set the new_file_name to the (the current_name & the prefix_or_suffix) as string
end if
my set_item_name(this_item, the new_file_name)
end if
end repeat
beep 2
on set_item_name(this_item, new_item_name)
tell application "Finder"
--activate
set the parent_container_path to (the container of this_item) as text
if not (exists item (the parent_container_path & new_item_name)) then
try
set the name of this_item to new_item_name
on error the error_message number the error_number
if the error_number is -59 then
set the error_message to "This name contains improper characters, such as a colon (:)."
else --the suggested name is too long
set the error_message to error_message -- "The name is more than 31 characters long."
end if
--beep
tell me to display dialog the error_message default answer new_item_name buttons {"Cancel", "Skip", "OK"} default button 3
copy the result as list to {button_pressed, new_item_name}
if the button_pressed is "Skip" then return 0
my set_item_name(this_item, new_item_name)
end try
else --the name already exists
--beep
tell me to display dialog "This name is already taken, please rename." default answer new_item_name buttons {"Cancel", "Skip", "OK"} default button 3
copy the result as list to {button_pressed, new_item_name}
if the button_pressed is "Skip" then return 0
my set_item_name(this_item, new_item_name)
end if
end tell
end set_item_name
Similar Messages
-
How to add new text field in standard report
how to add new text field in standard report?
Hi,
I presume you are talking about a report display in ALV and u wish to add a column to it .
If it is a global requirement ,as in table being used there in ALV can be modified, then you can append the table and the system should pick up the same automatically from there.
Otherwise , you can make a Z program . Modify the catalog being used in ALV.
Regards,
Shweta -
How to add new row and update existing rows at a time form the upload file
hi
How to add new row and update existing rows at a time form the upload file
example:ztable(existing table)
bcent smh nsmh valid date
0001112465 7.4 26.06.2007
0001112466 7.5 26.06.2007
000111801 7.6 26.06.2007
1982 7.8 26.06.2007
Flat file structure
bcent nsmh valid date
0001112465 7.8 26.06.2007 ( update into above table in nsmh)
0001112466 7.9 26.06.2007 ( update into above table in nsmh)
000111801 7.6 26.06.2007 ( update into above table in nsmh
1985 11 26.06.2007 new row it should insert in table
thanks,
Sivagopal RHi,
First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
Then :
Loop at it.
*insert or modify as per your requirement.
Endloop.
Regards,
Srilatha. -
I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20 - how can I change this?
Click on the below link :
https://get.adobe.com/flashplayer/otherversions/
Step 1: select Mac OS X 10.6-`0.`0
Step 2 : Safari and FIrefox
Then click on " Download Now" button. -
ever since the last firefox update I don't have my old bookmarks, can't add new ones and can't add my HTML file of my bookmarks
A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
*http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox -
How to add new "text" field in GL item fast entry?
Hi Gurus,
Is that possible to add "text" column or field in GL item fast entry. For example, if i go to Txn F-04, i enter all the details then i go to: "Goto>GL item fast entry (shift+F8). Now you will see layout (GL item fast entry). So back to my question before, is that possible to add new field or column (text field) in this layout? If the answer is Yes, appreciate Gurus help and guide me in configuration, if any.
Thank you
Regards,
NazrulHi Sreehari Annavaram,
Thank you for your kind reply. Based on the answer from the link you have given me (as per below quote), there's no "DEM03" in my selection screen. We only have SAP01, SAP02 and GL001 (customised layout). That's why i had created new customised layout GL002 and try to add the "text" field in layout as per my first question. But system still won't allow it.
*"In F-02 under editing option screen screen templates and line layout variant for document entry will be there in that
GL accounts items for fast entry select DEM03 u will get the text item"*
Appreciate help.
Thank you
Regards,
Nazrul -
How do I append data and sequence numbers to a *.csv file name?
All,
I am looking for an easy way to build a filename with the data and time included, as well as a sequential number between 1 and 999 in the following format:
C:\TestDirectory\test_11-08-25_1551_1301_001.csv
I have looked at using the Express function "Write to Measurement File" but I cannot see an easy way to include column headers as text into the output file. Maybe someone could show me how to do that?
Or, someone could point me toward another function that allows me to date and serialize the file name. Any help would be greatly appreciated.
I could code all this the old-fashioned, manual way, but I would rather find out if LabVIEW has built in functions that do this first.
Thanks!Like this
Tim
Johnson Controls
Holland Michigan
Attachments:
Example.vi 13 KB -
How to add new password policy to cn=config via LDIF file
I am trying to add a new password policy called "Service Password Policy". I have the following LDIF file:
dn: cn=Sservice Password Policy,cn=config
changetype: add
objectClass: top
objectClass: passwordPolicy
cn: Service Password Policy
description: A password policy intended for proxy or service accounts.
passwordMustChange: off
passwordChange: off
passwordMinAge: 0
passwordInHistory: 0
passwordExp: off
passwordMaxAge: 2142720000
passwordWarning: 0
passwordExpireWithoutWarning: off
passwordCheckSyntax: off
passwordMinLength: 6
passwordRootdnMayBypassModsChecks: off
passwordStorageScheme: ssha
passwordLockout: off
passwordMaxFailure: 32700
passwordUnlock: on
I've tried various permutations of this command:
dsconf import -h localhost -p 1389 /root/createServicePasswordPolicy.ldif "cn=Service Password Policy,cn=config"
I get this error:
"cn=config": suffix does not exist.
The "import" operation failed on "localhost:1389".
Thx for any help,
CCGood it did not work or you would have overwritten all the data currently in cn=config. Anyway, "dsconf import" only works on regular backends. The cn=config tree is special a.
You should use ldapmodify to add the contents to cn=config.
$ ldapmodify -p 1389 -D cn=root -f a.ldif -a -
How to add new subscreen & fields to ME51N
Hi Experts,
How to add new subscreen and to add new fields at item level, maybe someone have done this before and maybe can guide me...
Thank You.someone have experience on this? so can you guide me... tq
-
HI,
Any body can say how to add new object. For Example: The Document need to link with Invoice Transaction (T.Code: VF01, Table: VBRK/VBRP).
Points will be rewarded, if information is useful.
Tks
Mani.Hi
You can create New objects using the T.code: SE80.
You can make an object link to SAP objects that are not shown in the possible entries list. To do this, proceed as follows:
1. In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140. The processing logic must follow that of screen 1204 in program SAPLVC130.
2. Create function module OBJECT_CHECK_XXXX (XXXX = object name) If the object can be classified, this function module already exists .
Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
Regards
S.Sivakumar
Reward points if useful---- -
i need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by step explanation please beginner
Please post (a relevant section of) it right on this Forum.
-
ALV List Layout add new button and modify Append Row Button Text and Logi
Hi All,
I am working on Employee custom development Application in Webdynpro ABAP>
In my ALV list Layout I have to add new two Buttons Top or Bottom of the ALV List.
If I am adding I have to add logic for those Buttons. How to add and add logic for those buttons.
as well as I have to Change the Text for Existing Button ''Append Row'' to "ADD NEW ROWS"
and I have to add logic in this button while Append New Row I have to generate ID no for New Rows .
Kindly help/advice me to proceed further.
Thanks in advance.
DavHi Dav,
To Add buttons please refer this thred,
ALV with user-defined buttons on toolbar in wd abap
To change or rename text in ALV standard buttons, please refer this ...
How can i change the text of an standard button in ALV?
and also see this article on self defined functions...
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true
Thanks,
Kris.
Edited by: kissnas on Feb 22, 2011 5:59 AM -
How to add standard text in PO and how it is maintained ?
How to add standard text (paragraph) in PO and how it is maintained ?
Hi
Please go through this document.which has a step by step
Working with Frequently Used Texts
Use
You can copy texts from various sources to create PO texts:
Standard texts
Certain standard texts are supplied with the system and can be assigned to a purchasing document in Customizing.
The content of some standard texts is predefined by your system administrator.
You can also create standard texts yourself and copy them into purchasing documents.
Master records
Database fields
Activities
Creating Standard Texts
You can create your own standard texts via Tools ® SAPscript ® Standard text.
Inserting Standard Texts
You can insert your standard text on the long text screen via Insert ® Text ® Standard.
For more information, refer to the Basis documentation under BC Word Processing with the SAPscript Editor: Including Texts.
You can display the print preview via Text ® Print ® Print preview.
Inserting Texts from the Master Record
There are three ways of linking texts from a master record with a purchasing document. The relevant settings are made for each text type in Customizing for Purchasing. The indicator in the status column shows the nature of the linkage.
Option Indicator in status column
The text is copied:
It is then independent of the text None
in the master record. Changes to
the text in the material master record
have no influence on the text in the document.
The text is displayed only:
It cannot be adopted. N
The text is offered for copying:
It can be copied via Header or Item ® Texts ® Adopt text. (In requisitions: Goto ® Texts ® Adopt text.) Changes made in the master record will also be adopted in the document until such time as you copy the text.
Inserting Texts from Database Fields
You can include the content of a database field at any point in the text on the long text screen. A value specific to the relevant document is displayed in the printed document.
Choose Insert ® Symbols ® Program symbols.
Choose DDIC fields.
Search for the relevant table/structure (in the case of PO items, this is EKPO) and then choose ENTER .
Choose the relevant table field.
Choose Text ® Print preview to see the print preview.
Reward if useful
Aasif -
How can I transfer text and format from a Word Doc to a new Pages Doc?
How can I transfer text and format from a Word Doc to a new Pages Doc?
Select, and Copy in the Word doc and Paste in the Pages doc. It may not be perfect. Importing (Opening) the Word doc is probably better than using Copy/Paste for large amounts of content.
Jerry -
How to add new currency in ORCO and ORBO
Hi, I have successfully install ORCO, ORBO and ORPOS. I followed Implementation Guide, Volume 1 – Implementation Solutions to add new currency in ORPOS.
But I still do not know how to add new currency in CO and BO.
I try to use import parameter feature in ORCO and ORBO to import xml, the result said "Success" but there is no changes.
Please help show how I could achieve this.I change the FL_CNY_BASE into 1 already. POS is OK now. But BO is not regconize that there is a new currency. I'm trying to go to
Admin -> Job Manager -> Available Import -> Import BackOffice Parameters
and try to import xml file that contain belowing content.
<?xml version="1.0" encoding="UTF-8" ?>
<CurrencyImport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CurrencyImport.xsd" Priority="0" FillType="FullIncremental" Version="1.0" Batch="1" CreationDate="2001-12-17T09:30:47.0Z" ExpirationDate="2027-12-17T09:30:47.0Z">
<!-- Example of adding a Currency. -->
<Currency ChangeType="ADD" ISOCode="MYR" IssuingCountryCode="MY" Name="MYR" IssuingCountryNationality="Malaysian" IsBaseCurrency="true" Scale="2" Priority="0" />
<ExchangeRate ChangeType="ADD" CurrencyCode="MYR" MinimumAmount="0.00" EffectiveDate="2008-05-26" ExpirationDate="2050-06-02" ToBuyAmount="2" ToSellAmount="2" ServiceFeeAmount="0.00" />
</CurrencyImport>
The result said it success but I still cannot see any change.
Is there is any other things I should make change at BO? Any property file that I should make change? BO and CO is web application so the structure of files are not the same as POS. I can't following the same thing when I had made with POS for BO and CO.
Thanks for you helping
Maybe you are looking for
-
Hi My Thunderbird is running with ubuntu OS and while using some shortcut key my thunderbird mailbox switched to full screen mode. now i am not able to resize it's view and also not able to see minimize, maximize and close buttons on top left corner.
-
Free Source Softphones Problem
Hi, I'm trying to configure various free source softphones (linphone, ekiga and jitsi) to a cucm, but all of them failed. My question is, how can i configure an account to make them work properly. While trying to see what fails in wireshark, it says
-
I installed IOS 7 and now it won't accept my password. How do i fix it?
I finally got around to installing IOS 7 and now my phone won't accept the 4 digit passcode. I didn't think about disabling that feature before the upgrade. Never had a problem before. And yes, I'm sure I'm using the right code. I use it many times p
-
Document modified outside of book warning won't go away
I am working on a book in IDCS3 and recently one of the chpts shows the warning triangle in the book menu indicating modification outside of the book. I save the chpt and close it and the triangle still appears. I save as and the warning is still the
-
I was notified to upgrade OS X to 10.8.5. Part of the upgrade was adjustments to Safari. Now when I download a document into Adobe format it will not open and gives an alert that it is not able to be opened because it is damaged. Never happened be