I would like to write a script. Either AppleScript or a Shell Script. Whichever is more convenient. That will be run at login.
What it will do is randomly pick a file from a specified folder, copy it to a certain directory and rename it to a certain name.
To clarify, it will pick a JPG file from a folder of JPG's at random, and copy it to the "Desktop Pictures" folder and rename it "Aqua Blue.jpg". What this will do is every time I log out, I will have a different login desktop picture.
I'd probably use AppleScript but I'd be calling Shell commands from it for stuff like the copy and rename part. All I need to know basically is how do I randomly pick a file via AppleScript or the such?
This Script will only run once per login then quit when it's done obviously. I just need the one critical part. The file selection.
I wanna do it all without having to have the script open folders and select files. I want it all in the background at the beginning of my session. One time thing.
Thanks.
What it will do is randomly pick a file from a specified folder, copy it to a certain directory and rename it to a certain name.
To clarify, it will pick a JPG file from a folder of JPG's at random, and copy it to the "Desktop Pictures" folder and rename it "Aqua Blue.jpg". What this will do is every time I log out, I will have a different login desktop picture.
I'd probably use AppleScript but I'd be calling Shell commands from it for stuff like the copy and rename part. All I need to know basically is how do I randomly pick a file via AppleScript or the such?
This Script will only run once per login then quit when it's done obviously. I just need the one critical part. The file selection.
I wanna do it all without having to have the script open folders and select files. I want it all in the background at the beginning of my session. One time thing.
Thanks.