How to create a logon script to delete folder, subfolders and contents when a user logs on ?
I need to create a logon script which will delete a folder, subfolder and contents when a user logs on. I have no experience with scripting so any pointers you can give would be much appreciated.
Thanks
depending on how you have thing set up, it might be easier to make a LaunchAgent to handle this. do this:
copy the text below into a text editor
save it as a plain text file in /Library/LaunchAgents with the file name "user.startup.folderDeleter.plist" (the name doesn't matter so much, but the 'plist' extension is required)
load the plist into launchd by restarting the machine or by opening terminal and running the command launchctl load /Library/LaunchAgents/user.startup.folderDeleter.plist
This will delete the folder any time any user logs in. You could also expand this to delete the folder periodically (once a day, for instance) if that would be helpful.
Note, this file must be saved as plain text. apps like TextEdit sometimes default to making rich text files which will not work. Either download a programmer's text editor like TextWrangler, or make sure that TextEdit is using plain text (if the window has a formatting toolbar it's using rich text; select "Make Plain Text" from the Format menu).
copy the text below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>user.startup.folderDeleter</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>-e</string>
<string>tell application "Finder" to delete folder "Final Cut Express Data" of folder (path to preferences from user domain)</string>
<string>-e</string>
<string>tell application "Finder" to empty trash</string>
</array>
</dict>
</plist>
Similar Messages
-
How to Keep all the Portal report menu's are "open" when the user logs on?
Hi
I have a question about the BI Portalu2019s configuration. Does anyone know how to keep the Web Portal (i-vew) report menu's are "open" when the user logs on?
Thanks.
For example:
Web Report Panel
Report Folder A
i-view a1
i-view a2
i-view a3
i-view a4
i-view a5
i-view a6
Report Folder B
i-view b1
i-view b2
i-view b3
i-view b4
i-view b5
i-view b6Hi,
Thank you very much. The problem is the Folder didn't 'open when the user logs on. Yes, the iview can be openned. Does anyone know how to set the default Open for the Folder. My question is about the folder in BI portal. Yes, the ivew we can set the defaul Open but we have Folder in the portal and our user wants to be able to see the report lists when they log on to the Portal.
For example:
Our Current situation
Navigation Panel
.>Act vs Plan report Folder_
.>Year to Day report Folder_
Hope To Be (When user logs on the BI Portal)
Navigation Panel
.>Act vs. Plan report Folder
(i-view) Report A
(i-view) Report B
(i-view) Report C
(i-view) Report D
(i-view) Report E
.>Year to Day report Folder
(i-view) Budget by Cost Element report
(i-view) Actual by Cost Center report
(i-view) Income statement report
(i-view) Balance Sheet report -
How to create a error message for Deleted batch while creating a PO
Hi ,
Can any body tell me how to create error message for a deleted batch while creating a PO in ME21n,
when a PO is created for a deleted batch at GI &GR lebel it is showing a error message,
but i want to show a error message while doing the PO creation.
Thanks,
Sachhiin badi me_process_po_cust u can put this message
METHOD if_ex_me_process_po_cust~check. -
I want to know how to create a new script that can be run in batch proces in Photoshop Element 11 ?
Have a look at the menu file/process multiple files. You can choose to add your signature (or the caption) to the image and export the new files.
If that solution is not flexible enough, consider using the very affordable (12$) Elements+ add-on which offers a 'meta stamp' script :
http://elementsplus.net/v5/en/meta-stamp.htm
Otherwise, have a look at other free and good solutions like Faststone Photoresizer, Xnview... -
Hi...
3....how to create table maintanence generator for a z table and how to use that for transfering a selected records to one server to another server.
thanks and regards,
k.swaminath reddyHi,
Table maintanance Generator is used to manually
input values using transaction sm30.The Table Maintenance Generator is used to create table maintenance program to add, modify or delete records in the database table. This can be accessed using transaction SE54 or in SE11 using the menu Utilities->Table Maintenance Generator
<b>
Follow below steps</b>
go to se11 check table maintanance check box under
attributes tab
utilities-table maintanance Generator->
create function group and assign it under
function group input box.
also assign authorization group default &NC& .
select standard recording routine radio in table
table mainitainence generator to move table
contents to quality and production by assigning
it to request.
select maintaience type as single step.
maintainence screen as system generated numbers
this dialog box appears when you click on create
button
save and activate table
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
One step, two step in Table Maintenance Generator
Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
please check the link for getting information about table maintenance generator !
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=use%20of%20table%20maintenance%20generator&cat=sdn_all
http://www.sapdevelopment.co.uk/tips/tips_tabmaint_tcode.htm
http://www.sap-img.com/abap/create-a-table-maintance-program-for-a-z-table.htm
Regards,
Priyanka. -
How to create a public view for sharepoint list A and deploy this view to specific user personal view? Is that possible OOTB?
Views cannot be exported or moved. Can you elaborate your requirement?
--Cheers -
How to create list of a View's column names and source
Using SQL 2005, 2008, and 2012
How to create list of a View's column names and source. For the following example would like to @Print something like the following. Does anyone already have some code to do this? I realize there are probably some gotchas, but the views that I am looking
at to use this follows the code snippet pattern below.
DBACCT.[Account Number]
dbo.ConvertDate(DBACDT). [Boarding Date]
DBXES.DBXES
CREATE VIEW [dbo].[v_ods_DBAL]
AS
SELECT DBACCT AS [Account Number], dbo.ConvertDate(DBACDT) AS [Boarding Date], DBXES
FROM dbo.ods_DBALThe column information can be obtained from INFORMATION_SCHEMA.COLUMNS view using logic like below
SELECT c.COLUMN_NAME,c.DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS c
WHERE EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = c.TABLE_NAME
AND TABLE_TYPE='VIEW')
http://technet.microsoft.com/en-us/library/ms188348.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to create rtf template to view report in Word and Excel, with numeric f
Hi,
Please help me!
How to create rtf template to view report in Word and Excel, with numeric formatted fields (like this 999 999 999,99 with spaces between numbers) and then end user be able to process those fields with Excel tools (sum, etc).
Thank you.From what I have seen Excel can not handle 999 999 999.00. You can use 999999999.00 and then format it as you want in the xls bt you can not have values like 999 999 999.00 coming from publisher output and have functions on the values in Excel
Tim -
How to create PDF with Form Builder (T-Code:SPF) and how to use it?
How to create PDF with Form Builder (T-Code:SPF) and how to use it? Is there anyone can show me some doc. or PA material ? << removed >> Thank you very much!!
Edited by: Rob Burbank on Nov 11, 2010 1:04 PMPDF forms also known as Adobe From or Interactive Forms.
Check this link -
Interactive Forms
REG:ADOBE FORM
Adobe forms
Regards,
Amit -
How to create files into a NT authentication folder
Hi all,
I know how to create txt files on a local computer. But is it possible to create files into a NT shared folder on server machine which is user/password protected?
thanks,Hi,
try it with SAPFTP.
look:
- sample RSFTP004
- <a href="/people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap">FTP</a>
Andreas -
How do I change the script for a voice iChat Alerts for when a friend becomes unavailable?
How do I change the script for a voice iChat Alert for when a friend becomes unavailable?
Before I upgraded my system from Mac OS 10.4.11 to Mac OS 10.6.8 - I a had personalized the script for a voice iChat Alert when my husband logged off from work. I had the ichat voice warn me "OH, Crap! he's coming home now! Hurry clean house!" This personalized voice alert did not survive the upgrade. Now, I need step by step instructions to walk me through the process. Please help! I mis my machine shouting funny profane alerts.Hi,
In iChat 3 (OS 10.4.x) there was Line at the Bottom of iChat > Preferences > Alerts that you could enter text to and it would speak that Text.
(you could set something against Individual Buddies as well).
This Setting is not there in iChat 4 or 5 (I presume iChat 6 as well).
Now it is possible to write AppleScripts that can Speak.
It is alos possible in iChat 4 upwards to link an AppleScript to an Action/Alert
At this point my lack of AppleScript knowledge lets me down on what to tell you to do next.
An Alternative would be to Record a sound with said alert.
Place this sound in your Home Folder/Library/Sounds
Then in the Alert opton for youe husband select the Log off option and link that Sound
<
10:25 PM Wednesday; August 3, 2011
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb( 10.6.8)
Mac OS X (10.6.8),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
How to create a multi-page collapsible & CSS styleable table of contents box?
How to create a multi-page collapsible & CSS styleabe table of contents box?
Is there a tool available for Dreamweaver or for standalone operation that can create for multi-page articles a collapsible & CSS styleabe table of contents box based on the page titles?You could do this with jQuery.
Table of Contents -
http://www.downloadjavascripts.com/list/javasiteccc68/Details.aspx
Collapsible Panels, Tables & Accordions -
http://www.downloadjavascripts.com/Collapsible_And_Free_Accordion_Panels.aspx
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com -
How to create a graph representing a big tree(parents and children are know
How to create a graph representing a big tree(parents and children are known)?
Thank you so much!
Also, I need to write the graph into a jpg/gif file or display the graph in the web browser.
I got a code from JGraph and can create the graph I want, although unextendable. However, JGraph define the graph as class Gscene instead of Img or BufferedImg or RenderedImg. Therefore, I couldn't use ImageIO.write(image, ext, file) to write the graph into a jpg file.aiGrace wrote:
How to create a graph representing a big tree(parents and children are known)?Hierarchical data structures are covered here all the time. Please search before you post. This topic has been covered over and over.
Thank you so much!
Also, I need to write the graph into a jpg/gif file or display the graph in the web browser. I got a code from JGraph and can create the graph I want, although unextendable. However, JGraph define the graph as class Gscene instead of Img or BufferedImg or RenderedImg. Therefore, I couldn't use ImageIO.write(image, ext, file) to write the graph into a jpg file.Did you read the JGraph API? I'm guessing it exposes a method to get the image data somehow. -
How do you make a program run when any user logs in?
I have an application which will need to run when any users logs in.
Such that Joe downloads and installs the application, logs out, then Sally logs in and the application runs for Sally.
Does anyone know how to do this?Hey Steve, thanks for that link. It seems to be what
I am looking for. What is the meaning of the
~/Library vs /Library ? They are definitely
different folders.
Yes, they are definitely different folders. The "~" character represents the current users home folder, so "~/Library" represents the Library folder that's located inside a users home folder. Anything placed in there will only affect the one user whose home folder you've accessed.
The "/Library" folder is the Library folder that exists at to root of the boot volume. Things placed in this Library folder will affect all users of the system. Basically it's sort of a "global" Library.
Also, from a script, how do I add an item to execute
for that kind of PList?
That could be tricky based on the structure of that particular plist file. I haven't really looked at it closely but one place you could start is to read the "man" page for the "defaults" command... enter "man defaults" in Terminal. The "defaults" command allows you to read/write plist files, but defaults is not very good at accessing deeply nested plist items.
Related to that, how do I tell if the logging item
for my App is already there? I do not want to keep
adding to the list if it is there. If someone
deletes my app and then reinstalls it, I do not want
it to run twice, three times, etc..
Again, you could possibly read the plist using the defaults command and determine whether your item was already present or not.
Do you know of the one in the ~/Library path, what
user it execute as? Since it is all users, it
probably is root or something like that.
No, the one in ~/Library is in each individual user home folder. It will execute with the current user's privileges. This is where Login Items normally go when you go through the GUI... "Sys.Prefs -> Accounts -> Login Items" and add a login item for one user.
Even items placed in /Library, which should execute for all users, will execute with the current user's privileges.
In the near
future we might need root privileges, so I might need
a program to startup for all users as root instead of
the user.
Is your app, that needs to run at login time, a GUI application or is it a faceless shell script (or something similar). Your original post gave me the impression that you needed to launch a GUI application. However, if it's a shell script then you probably want to look at doing a LoginHook instead of using the Login Items procedure at the web page I posted earlier. I believe a LoginHook will also give you the ability to run the script as root.
Check out this link at the ADC website.
or
Take a look at this information and this utility at Mike Bombich's website.
Steve -
How can the info block be assigned with the view and assign view to users.
Dear Friends,
Anyone could plz tell me how can the info block be assigned with the view and assign view to users. Also how can the info block in sale summary be assigned with a view and how to assign this view for user.
Regards,
AshimaHi,
To define view and to make it default
Goto SAP IMG > Sales and Distribution > Sales Support (CAS) > Sales Summary > Define Reporting Views (Tcode:OVCD).
To assign default user to the view.
Goto SAP IMG > Sales and Distribution > Sales Support (CAS) > Sales Summary > Assign Default View To User (Tcode:OVCC).
To assign Elements of SAPScript "SD-SALES-SUMMARY" to information Blocks To A View use
Goto SAP IMG > Sales and Distribution > Sales Support (CAS) > Sales Summary > Assign Information Blocks To A View (Tcode:OVCB).
Maybe you are looking for
-
Snapshot replication slow during purge of master table
I have basic snapshot/materialized view replication of a big table (around 6 million rows). The problem that I run into is that when I run a purge of the master table at the master site (delete dml), the snapshot refresh time becomes slower. After th
-
Hi experts, I have the report requirement like below. I have the formula variables like Flow1,Flow2 etc upto Flow10.All these are characteristics. my report output looks like below. Jan Feb March April May - Upto Dec F
-
Photoshop CS6 has out of memory errors under Mac OS X 10.7.4
Has anyone who has a 2008 MacBoo Pro with the NVIDIA GeForce 8600M GT 512 MB graphics card tried running Photoshop CS6 under Mac OS X 10.7.4? On my MacBook Pro, PS CS6 launches; however, any action results in an out of memory error. The CS6 versions
-
We have a LabView Program that is set up to start our pump motor and then read data from a pressure transducer. We also have a program timer to stop the test after 5 seconds. The program writes to a file what the pressure was at a specific time. I
-
CPI2.0 RSL #2032 error while adding NAM Datasources
Hello, Despite implemented the RSL-Flash Patch allready, I get into this error when trying to add NAM Datasources at Administration > System Settings > Data Sources after having the HTTPS credentials for the NAM's configured. The RSL-Flash Patch was