Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > A Hack for Show Item Info?

A Hack for Show Item Info?
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2006
Status: Offline
Reply With Quote
May 6, 2006, 06:59 PM
 
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
Reply With Quote
May 6, 2006, 07:43 PM
 
Perhaps you could use an AppleScript to change the folder's name when the content is changed, using Folders actions? Ex: "My folder (34)"
     
Kenelm  (op)
Fresh-Faced Recruit
Join Date: Jan 2006
Status: Offline
Reply With Quote
May 6, 2006, 07:55 PM
 
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?
     
Kenelm  (op)
Fresh-Faced Recruit
Join Date: Jan 2006
Status: Offline
Reply With Quote
May 6, 2006, 09:56 PM
 
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
Reply With Quote
May 6, 2006, 10:33 PM
 
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. )
     
Kenelm  (op)
Fresh-Faced Recruit
Join Date: Jan 2006
Status: Offline
Reply With Quote
May 6, 2006, 11:54 PM
 
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
Reply With Quote
May 8, 2006, 03:50 AM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:57 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2