How can i determine the order automator actually gets the files?
Hi,
I'm a newbie so excuse my probably simple question, but I have a problem using Automator to change the names of files.
What I'm trying to do is using Automator to rename files that are in a specific order and have to stay that way. I'm trying to use the "Make Sequential" option to rename the files and add numbers after the filename. Everything works out fine except for that Automator somehow shuffles the files I give him before numbering them.
Here's what I do:
-select files in Finder and add them to Automator
-create my workflow
-sort the files in Automators "get"-window by name (which is the order they have to stay in!)
-and start the workflow
the problem is that my files come out renamed and numbered just fine... but it always messes the order up!
how do i properly tell automator which item to start with so that the order stays in tact??
doesn't it just use the files in the "get"-window from top to bottom?
Thanks a lot for your help!!!
Hi, are you still on 10.4.x?
Automator is a bit different in each OS, not sure this will help, but take a look...
http://www.macosxtips.co.uk/index_files/batch-rename-multiple-files.html
Similar Messages
-
How can I use my product code to get the serial code to active my dreamweaver?
My product contain 22 letters and numbers, it can't feet inside any code thing that I found, and I had already sent a email to let them send back the serial code to me, but it didn't. So I want to ask how can I use my product code to get the serial code so that I can active my dreamweaver?
I already in downloaded the thing, but I just have a product code, how can I install the product?
-
I want to add multiples of the same song from different playlists to my ipod but iTunes wont let me. How can I override this so that I get the songs I want on my ipod?
You can sync those different playlists to the iPod, and the song appears on each playlist. However, the song is stored on the iPod once. What is the practical reason for wanting to store the same song file multiple times (and waste storage space) on the iPod?
-
How can i determine which devices are used at the moment?
Hi all,
I am designing an interface with LabVIEW for uing agilent devices. My work colleagues will use this interface. I want to determine which devices are used at the moment and if I determine used device, i will add automatically device names to interface's main vi. So all my work colleagues can see on the program which devices are used by another colleague. This devices are connected with GPIB. İ want to learn is there any function on Instrument I/O palette.
Thanks,
Omer
Solved!
Go to Solution.Hi Omer,
so those devices are connected to the PC with a GPIB connection. Will your collegues run several DAQ programs at the same time?
GPIB-devices being controlled by PC don't have a "in use"-signal. They wait for commands, execute them and send an answer. When you start to control them using two programs they may respond to both programs, mixing up settings/measurement values and so on.
That being said: In MAX you can see all devices connected to your GPIB port. You could scan the GPIB port using VISA commands in your program. You might even try to access a certain device by it's VISA alias. I really don't know if you will get a "device nopt available" error message when that VISA alias is in use by a different program - but you might do a quick test on your own…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
I often get the message that I am being disconnected from chat because i've logged on from another computer. I never use chat, and it just seems to be a problem. How can I get rid of it?
Don't expect any wonders. If you use it heavily with multiple applications running at the same time, nobody can help you. It's physics: more usage => higher energy consumption.
Here you can find some tips to reduce the battery consumption. My tip: close applications if you don't need them right now and reduce screen brightness. -
How can I place listeners on actions or get the action events
I want to add listeners to photoshop actions. For example, if a user use brush to draw a line, how can I get this event and use it to trigger something else? Does any PS SDK doc include this area? Thanks
Sorry, I can't help you much with that, take a look at the getter-plugin example - it gets some history information, but I'm not sure if it also retrieves any parameters, maybe this will give you some insight.
-
Have been using a lower version of firefox on my samsung galaxy phone to access [email protected] for quite some time. Since the upgrade to 10.0, I receive a server error everytime I try to access. Want to download a lower version, but app doesn't appear on my phone. How can I download a lower version and get the app to show up on my phone?
Mandel is referring to what is called a "User Agent Faker' which tricks the website into thinking it is a different browser or version than it actually is. I sometimes would use this on my iPhone when I wanted to visit the full website of a site I was attempting to go to & it would only take me to the mobile version or state it was only compatible with say Internet Explorer, simply turn it on & select the browser and details you want it to report and it will spoof that browser & you'll be on your way.
-
I have just put an audio book into my iTunes music library. When I tried to transfer it to my iPod Shuffle it put the chapters in the wrong order i.e. Chap 1, Chap 10, Chap 11 etc. rather than Chap 1, Chap 2, Chap 3 ... How can I get it to put them in the order they appear in the book?
First, we need to know if the audiobook chapters are being treated by iTunes as music files or as audiobooks. If they are not audiobooks purchased from the iTunes store, they might be getting "shuffled". You will need to look at "File" - "Properties" (I think - I don't use iTunes under Windows - or right-click on the file and choose "properties") and look at the media type. If it is "Music", change it to "Audiobook". If this is not the problem, or does not fix anything, please post back.
Actually, looking at your post again, a second thought occurs to me - assuming there are less than 100 chapters in the book, just renaming them with a leading zero on the first nine chapters might do it. A computer will alphabetically sort filenames in the order you quote (1, 10, 11, 12, 13, ... 2, 21, etc.) but a leading zero will fix that (01, 02, 03 ... 10, 11, 12) -
Hello,
I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
Let me explain. I need a vb script for the following scenario:
1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
2. These are shared workstation i.e. different users login to these machines from time to time.
3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
.CSV file located at C:\Temp directory on the machine.
4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
System Rights
I tried the script detailed at:
http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx
Const MY_DOCUMENTS = &H5&
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_DOCUMENTS)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path
Set objFolder = objFSO.GetFolder(strPath)
Wscript.Echo objFolder.Size
The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
'0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
I then tried the script at:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
This script returns the correct value but only for the current logged-on user.
Const blnShowErrors = False
' Set up filesystem object for usage
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
' Display desired folder sizes
Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
' Recursively tally the size of all files under a folder
' Protect against folders or files that are not accessible
Function FindFiles(objFolder)
On Error Resume Next
' List files
For Each objFile In objFolder.Files
On Error Resume Next
If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
On Error Resume Next
FindFiles = FindFiles + objFile.Size
If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
Next
If Err.Number = 0 Then
' Recursively drill down into subfolder
For Each objSubFolder In objFolder.SubFolders
On Error Resume Next
If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
FindFiles = FindFiles + FindFiles(objSubFolder)
If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
Next
Else
ShowError "FindFiles:03", objFolder.Path
End If
End Function
' Function to format a number into typical size scales
Function FormatSize(iSize)
aLabel = Array("bytes", "KB", "MB", "GB", "TB")
For i = 0 to 4
If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
Next
FormatSize = Round(iSize, 2) & " " & aLabel(i)
End Function
Sub ShowError(strLocation, strMessage)
If blnShowErrors Then
WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
WScript.StdErr.WriteLine " " & strMessage
Err.Clear
End If
End Sub
The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
Is this possible?
Please help.Here are a bunch of scripts to get folder size under all circumstances. Take your pick.
https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
¯\_(ツ)_/¯ -
How can you determine the absolute path to a dynamically created NetStream object?
We are trying to implement video captioning with a freeware component, ccforflash. This requires us to provide an absolute or relative path to our NetStream object. How can we determine this path in Flash CS5 AS3?
From the CCforFlashCS5 documentation:
"2. Object name and path
Type the name and path. This is the instance name of the object with which CCforFlashAS3 will synchronize. It must be spelled correctly, since CCforFlashAS3 will query the object with this name for timing information in order to synchronize the captions. The path must also be included; either relative to the CCforFlashAS3 component (i.e. this.parent) or the absolute path from the main level of the movie (root)."It would be easier if the NetStream object was created on an easily identifiable place on the timeline. This player has an MVC architecture. The NetStream object is created in a subclass to Model class, which is itself a subclass of the EventDispatcher object. The View class access it via an interface.
As you can guess, it's not that straightforward to determine where the NetStream object is located on the timeline. This is compounded by the fact that the NetStream object does not have a name property.
I've tried methods like these, but they only work for the DisplayObject class:
public static function displayObjectPath( avDisplayObject : DisplayObject ) :String
var lvPath:String = "";
do
if( avDisplayObject.name ) {
// var obj_name:String = (avDisplayObject.name == 'root1') ? 'root' : avDisplayObject.name;
if (avDisplayObject.name != 'root1') {
lvPath = avDisplayObject.name
+ ( lvPath == "" ? "" : "." + lvPath );
} else {
trace("displayObjectPath() NO NAME avDisplayObject="+avDisplayObject);
} while( avDisplayObject = avDisplayObject.parent );
return lvPath;
} // displayObjectPath
private function showChildren(d:DisplayObjectContainer):void {
trace("showChildren()");
if (d.numChildren>0) {
for (var c:Number = 0; c < d.numChildren; c++) {
trace("showChildren c=",c," name=",d.getChildAt(c).name); -
Hello. I would like to write async tcp client and server. I wrote this code but a have a problem, when I call the disconnect method on client or stop method on server. I can't identify that the client or the server is no longer connected.
I thought I will get an exception if the client or the server is not available but this is not happening.
private async void Process()
try
while (true)
var data = await this.Receive();
this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
How can I determine that the client or the server is no longer available?
Server
public class Server
private readonly Dictionary<IPEndPoint, TcpClient> clients = new Dictionary<IPEndPoint, TcpClient>();
private readonly List<CancellationTokenSource> cancellationTokens = new List<CancellationTokenSource>();
private TcpListener tcpListener;
private bool isStarted;
public event Action<string> NewMessage;
public async Task Start(int port)
this.tcpListener = TcpListener.Create(port);
this.tcpListener.Start();
this.isStarted = true;
while (this.isStarted)
var tcpClient = await this.tcpListener.AcceptTcpClientAsync();
var cts = new CancellationTokenSource();
this.cancellationTokens.Add(cts);
await Task.Factory.StartNew(() => this.Process(cts.Token, tcpClient), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
public void Stop()
this.isStarted = false;
foreach (var cancellationTokenSource in this.cancellationTokens)
cancellationTokenSource.Cancel();
foreach (var tcpClient in this.clients.Values)
tcpClient.GetStream().Close();
tcpClient.Close();
this.clients.Clear();
public async Task SendMessage(string message, IPEndPoint endPoint)
try
var tcpClient = this.clients[endPoint];
await this.Send(tcpClient.GetStream(), Encoding.ASCII.GetBytes(message));
catch (Exception exception)
private async Task Process(CancellationToken cancellationToken, TcpClient tcpClient)
try
var stream = tcpClient.GetStream();
this.clients.Add((IPEndPoint)tcpClient.Client.RemoteEndPoint, tcpClient);
while (!cancellationToken.IsCancellationRequested)
var data = await this.Receive(stream);
this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
private async Task Send(NetworkStream stream, byte[] buf)
await stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
await stream.WriteAsync(buf, 0, buf.Length);
private async Task<byte[]> Receive(NetworkStream stream)
var lengthBytes = new byte[4];
await stream.ReadAsync(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
var buf = new byte[length];
await stream.ReadAsync(buf, 0, buf.Length);
return buf;
Client
public class Client
private TcpClient tcpClient;
private NetworkStream stream;
public event Action<string> NewMessage;
public async void Connect(string host, int port)
try
this.tcpClient = new TcpClient();
await this.tcpClient.ConnectAsync(host, port);
this.stream = this.tcpClient.GetStream();
this.Process();
catch (Exception exception)
public void Disconnect()
try
this.stream.Close();
this.tcpClient.Close();
catch (Exception exception)
public async void SendMessage(string message)
try
await this.Send(Encoding.ASCII.GetBytes(message));
catch (Exception exception)
private async void Process()
try
while (true)
var data = await this.Receive();
this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
private async Task Send(byte[] buf)
await this.stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
await this.stream.WriteAsync(buf, 0, buf.Length);
private async Task<byte[]> Receive()
var lengthBytes = new byte[4];
await this.stream.ReadAsync(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
var buf = new byte[length];
await this.stream.ReadAsync(buf, 0, buf.Length);
return buf;Hi,
Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
private async void Process()
try
while (true)
var data = await this.Receive();
this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
Console.WriteLine(exception.Message);
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can I determine the type of video out connector I need?
Howdy,
I have a white macbook purchased Jun/2008. I want to connect to a TV but don't know what adapter I need. How can I determine the type of video out jack my macbook has?
System Profiler says the model identifier is "MacBook 4,1". Under Graphics/Displays the only thing it says about the "Display Connector" is that no display is connected. Too bad it doesn't tell me what type of connector it is. If I knew the name of the connector I'd probably be home free. But it seems like every macbook model has a different video connector (since the state of the art has advanced over the years) and I haven't been able to keep up with the names.
Now, I have a 6" long adapter that will convert this connector to VGA. And searching the Apple store for VGA adapters, the existence of mine says my connector is might be one of "Mini DisplayPort", "Apple Mini DVI", "Apple DVI", or "Apple Micro-DVI". But then there is also the connector at
http://store.apple.com/us/product/M8639G/A?mco=MTY3ODQ5OTY
and that looks like the one I have. But unlike the other adapters, this one is just called a "VGA Display Adapter". Does the connector have a name? How can I find adapters that have that same connector?
I know I could use the adapter I have, plus a VGA to VGA cable, to hook up to a TV. But the quality of the VGA signal is poor in the digital world. My goal is to hook up to the TV via HDMI. Is this even possible? By which I mean, will my macbook generate the signals necessary to be able to be converted to HDMI?
Thanks for any help,
Zebulon TThanks, Ded,
You're right, the cable that I have won't work. I't from my previous, 2004 iBook. This is pretty embarrassing... I looked at the cable but didn't bother to try plugging it in.
Looking at the close-up picture of the Mini-DVI to VGA adapter, that does look like the right connector. So I have Mini-DVI, and the other apter you pointed to can convert this to DVI. I'll take a look to see what makes the most sense, connector wise, downstream from that.
Thanks very much.
Zeb T -
I can't see an app on my iphone, but when i search i get it. i've made room for the icon to show up on screen, but how do i actually get the icon to appear?
On your iPad, just go to Settings>Mail, Contacts, etc.>Add account>iCloud and put in the details of the account you set up. Shouldn't be a problem at all.
-
When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
Websites remembering you and automatically log you in is stored in a cookie.
*Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
*Tools > Options > Privacy > Cookies: Exceptions
In case you are using "Clear history when Firefox closes":
*do not clear Cookies
*do not clear Site Preferences
*Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
*https://support.mozilla.org/kb/Clear+Recent+History
Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins. -
When I try to record a video on the Ipad Air, the screen automatically "zooms in" closer than when I'm taking a photo. So I frame the interview and record it. But when I export it to post it or edit it, I discover that only the screen was zoomed in, the camera wasn't, so I have all this extra stuff around the edges of my frame.
I don't need to zoom in, but I do need to be able to see what I'm shooting--otherwise, as I'm videotaping, I'm guessing at my picture's framing. But every time I switch from photo to video mode, the screen "zooms in." How can I see what I'm actually recording?
I've been searching for an answer for this for a while, but I can't find any responses to it! Thanks.Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
*Firefox > Preferences > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
See also:
*http://kb.mozillazine.org/Images_or_animations_do_not_load
*https://support.mozilla.org/kb/Images+or+animations+do+not+show
Maybe you are looking for
-
i have MSI N770 2GB TF OC. do I have to install the driver from the NVIDIA site or from the MSI website? ====================== I also have a MSI N760 2GB TF OC, a new use for 6 months, but already suffered damage. My PC can not boot, and the motherb
-
How to get rid of Photo Library in Photos App
Hello, Am an iPhone user with a question, when i upload new photos from iTunes, the iPhone automatically generate the Photo Library. how can i get rid of this Photo Library
-
Using WebI with SAP BW Data - Best practice for introducing BW Accelerator
Hi, We have a significant investment in using BOE XI 3.1 SP2 integrated to SAP BW 7.0 EHP 1 SPS05. Now we intend to introduce BW Accelerator to improve the data fetch performance for the Adhoc (WebI) Analysis and the formatted reports built using Web
-
Working between different versions of FCP
Hi folks, I've seen some posts where this is addressed a bit, but not for the versions of FCP that I'm dealing with so I wanted to see if anyone had any insight. I have one of the final generation PowerPC G5s and I got FCP 5.0 (as part of FCS) when I
-
After upgrading from Snow Leopard to Mountain Lion, the text in my nav bar and inside browsers (generally all around) seem to be smaller and possibly different (thinner) to what they were before. I would like to revert back to their previous appearan