 |
 |
A Hack for Show Item Info?
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2006
Status:
Offline
|
|
There's a folder on my Desktop that I want to monitor the number of files in. I know the Show Item Info in the View Options will do that, but I don't that info for everything else on my Desktop.
Is there a way to apply this option on an individual folder?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: Montréal, Québec (Canada)
Status:
Offline
|
|
Perhaps you could use an AppleScript to change the folder's name when the content is changed, using Folders actions? Ex: "My folder (34)"
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2006
Status:
Offline
|
|
Originally Posted by FireWire
Perhaps you could use an AppleScript to change the folder's name when the content is changed, using Folders actions? Ex: "My folder (34)"
I've looked into this, but with what I'm doing I need another piece of information. A previous folder action interferes.
In AppleScript, how do I move all files that have a certain extension to another folder that starts with a certain string?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2006
Status:
Offline
|
|
My current move command is "mv ~/Desktop/*.dmg ~/Desktop/DMGs" But with adding a Folder Action that adds a number to the folder name to tell me how many items are in the folder, my move command no longer works. The folder name gets changed with every file that gets added -- DMGs (1) , DMGs (2).
I know with the command "find ~/Desktop -name 'DMGs*' -type d" I can get the correct folder name in the printout. Problem is, there is no way to pass this value to the mv command.
I tried "mv ~/Desktop/*.dmg find ~/Desktop -name 'DMGs*' -type d" I tried the command with "-type d" on and off. I get the following output:
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory
So my question now is, if I can't use a directory wildcard, what's another way to move all files with .dmg extension to a DMGs folder whose name will constantly change but will always start with DMGs?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: Montréal, Québec (Canada)
Status:
Offline
|
|
Originally Posted by Kenelm
So my question now is, if I can't use a directory wildcard, what's another way to move all files with .dmg extension to a DMGs folder whose name will constantly change but will always start with DMGs?
There's probably a more simple solution, but you could
a) set a second folder as the placeholder for the number: you'd have 2 folders, the one named DMGs, and the second "Items in DMG (34)" for example. Inelegant, but it would work.
b) write an AppleScript wrapper for your terminal command, which would pass it the current folder's name as a variable. Instead of the direct name, you would call a variable, which AppleScript would provide. Ex:
Code:
set theCommand to "mv ~/Desktop/*.dmg ~/Desktop/" & FolderName as string
do shell script theCommand
I think there may be a way to use a wildcard, but you would have to do a separate command, or at least a pipe ( | ).
(Last edited by FireWire; May 6, 2006 at 10:40 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2006
Status:
Offline
|
|
Originally Posted by FireWire
There's probably a more simple solution, but you could
a) set a second folder as the placeholder for the number: you'd have 2 folders, the one named DMGs, and the second "Items in DMG (34)" for example. Inelegant, but it would work.
b) write an AppleScript wrapper for your terminal command, which would pass it the current folder's name as a variable. Instead of the direct name, you would call a variable, which AppleScript would provide. Ex:
Code:
set theCommand to "mv ~/Desktop/*.dmg ~/Desktop/" & FolderName as string
do shell script theCommand
I think there may be a way to use a wildcard, but you would have to do a separate command, or at least a pipe ( | ).
I too think there is an easier way. I didn't want to work with two folders. I worked a little with pipes, but still couldn't get it working. I've only been looking at AppleScript for a couple of days. I don't know much.
Perhaps someone else on the board can shed some light on this.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2004
Location: Australia
Status:
Offline
|
|
There is a small plug in app called FolderGlance which may do what you are seeking. You can CNTL-click on a folder and see the list of contents.
HTH
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|