Automator: using a text file to set several items from the finder?

Hello

what I would do:

I have a text file that contains multiple entries for files and folders, each on a separate line. I want to dragndrop this file on an automator action, he should ask me a destination folder and then copy all the files and folders in this folder.

I have my action, automator, set up like this:

Elements of the open Finder

Get the content of the TextEdit Document

Copy to the Clipboard (I have not found another way to keep my text sort file values and let it not be crushed by the following, but it works)

Quit the Application (TextEdit)

Ask the Finder items (this requires a destination folder)

Set the value of the Variable (Destination)

Get the contents of the Clipboard

Copies the items from the Finder (at Destination)

It all works, but only when there is 1 entry in my text file. As soon as I have 2 lines of text, I get the following error message:

The action "copy Finder items" has not provided with the required data.

How can I make this work with multiple entries?

The problem is that you only pass the only element to the copy action (you have copied text), instead of an element for each line (paragraph) in the text.  The solution is to use the action filter paragraphs to break up along the borders of paragraph text, which will give you a list of items.  In addition, you do not necessarily have to use TextEdit or the Clipboard - If you already have a file somewhere, you can simply use the action to combine text files to read the text.

With the above modifications, your workflow should look like:

Ask the Finder items  (ask for a destination folder)

Set the value of the Variable  (Destination)

Ask the Finder items  (Download text files) - set the action to ignore the entry

Combine text files  (read the text files)

Filter paragraphs  (paragraphs which are not empty return)

Copy the items to the Finder  (at Destination)

Tags: Mac OS & System Software

Similar Questions

  • How can I search and return several items from the table quickly (like Matlab find)?

    Hi, I'm a pretty experienced Labview programmer, and I've always wondered if there is a way to quickly search for pictures on several items that meet the selection criteria, equivalent to the Matlab find command.  While my inability to do in Labview has always annoyed me, I now have an application that requires this capability and I need to find a solution.

    Is the fastest way I've found to do this in labview to perform comparisons on the data vectors, then use the Boolean value that results from vector to analyze the table using a loop and shift registers.  I enclose an extract vi a analysis comparative vi to one of the simple searches that I need to do.  On my laptop, this research takes about 600 ms.  In comparison, the equivalent in Matlab:

    newArray=oldArray(find(oldArray(:,4)./oldArray(:,2)>1.5),;

    runs in about 1.2ms.  So, the way I am doing this in Labview is only 400 times slower

    Needless to say, I need to make these types of research many times, and these additional 599 ms start to add up pretty quickly!

    Thanks for your help,

    Aaron

    Hi Aaron,

    the slow part is probably "build group" of the node in the loop.

    Try this:

    Define an array the same size as the input data (or simply uses a copy of it) and the wire that to the shift register. Keep a counter of lines found in the loop. Use IndexArray and ReplaceArraySubset for the loop to move rows found at the beginning of the table (overwrite the 'bad' lines). After the loop simply ReshapeArray the number of found lines...

    Sorry, don't have LV (2009) on hand for editing your snippet.

  • It is usually safe to remove items from the user / local/temp file? I want to free up space.

    Original title: local/temp folder files

    It is usually safe to remove items from the user / local/temp file?  I want to free up space.

    Clean the system (compensation to all temp/tmp folders and included all the content offline, the tif browser, delete the cookies of compensation.)

    Do a disk cleanup. Click the Start button. in the search box, type Disk Cleanup, and then in the list of results, click Disk Cleanup.

    Delete your temp files where a large number of software malware installers cache and or CCleaner for a more thorough cleaning.

    Download the basic version (slim) via

    http://www.CCleaner.com/download/builds.aspx>

    The basic version (slim) does not contain the toolbar disgusted

    Cleaning DO NOT USE ANY Advanced options. DO NOT TOUCH THE REGISTRY OR TOOLS. At least not for now.
    Reset

    UTC/GMT is 04:20 on Thursday, January 5, 2012

  • Photoshop CS3 can not save a file when it is selected in the Finder

    Photoshop CS3 can not save a file when it is selected in the Finder: "cannot save ' [filename] ' because the file is already in use or has been left open."

    I am running Photoshop CS3 on Mac OS X Yosemite 10.10.5.

    Is there one solution other than to get a new version of Photoshop? It is quite annoying to have to switch to the Finder and deselecting the file that I work with.

    Well, I specifically asked if there was one solution other than to get a new version of Photoshop.

    I found a way to do so; Open the file does not by double-clicking, but by right clicking. He let the file not selected in the Finder, at least in list view or column.

  • The file ProductionPremium_cs5_ls7.7z is corrupted from the adobe download page, my portable hard drive crashed and I am trying to reinstall, and naturally, I can't talk to someone at Adobe, please help

    The file ProductionPremium_cs5_ls7.7z is corrupted from the adobe download page, my portable hard drive crashed and I am trying to reinstall, and naturally, I can't talk to someone at Adobe, please help

    Try a different download link

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a way to go to a page to download the Adobe programs if you do not have a disk or drive

    -Cloud desktop http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    -Cloud Getting Started https://helpx.adobe.com/creative-cloud.html

    -you will need to enter your original serial number during the installation for non-Cloud programs

    - or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216

    Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq

    When you ask a question you will need to provide some basic information

    -Forum quick start https://forums.adobe.com/docs/DOC-5601

    Mac or Windows and EXACTLY what version of the operating system?

    Recent Mac AND Windows operating systems have been known to cause problems "weird."

    Using a full account of computer administrator with read/write permission?

  • How can I delete several images in the Finder at the same time

    How can I delete several images in the Finder all at once rather than one by one

    Click on an image and the successive images to press the SHIFT, or command key by clicking on the image to add it to the selection. Then Ctrl-click (tap two fingers) on any icon and choose to put in the trash. If the icons are in an easily selectable column or online, you can click on the window that contain, and then drag around them for a multiple selection.

  • I use Homeshare to watch downloaded movies on my computer and then visible on my TV via Apple TV, but I how remove items from the library of movies on Apple TV when I looked at the

    I use Homeshare to watch movies downloaded on my computer and made visible on my TV via Apple TV. How to remove items from the show announced on television through homeshare /AppleTV when I looked at them?

    You must delete the contents of iTunes on the computer to remove it from the list of content on Apple TV.

  • Please tell US if there is a way I can recover a FILE that was accidentally deleted from the Recycle Bin. and then "emptied" from the bin.

    Please tell US if there is a way I can recover a file that was accidentally deleted from the Recycle Bin. and then "emptied" from the bin.

    If it was very recent, this tool would have a good shot at it.
     
     
  • Is there a way to restore a SINGLE FILE in a folder deleted from the Recycle Bin?

    Suppose that you remove all the contents of a folder that contains the files and subfolders. If you open the Recycle Bin, you can see a list of deleted files and subfolders, but there is no way to see the files in the subfolders. So, if you want to restore ONLY a single file in a subfolder of the deleted, it seems there is no way to do it. You can only restore the entire sub.folder, which is not necessarily what you want, especially if you filled out the application parent with other files and subfolders after the deletion.

    Is there a way to restore a SINGLE FILE in a folder deleted from the Recycle Bin?

    Another method would be to drag the folder to the Recycle Bin on your desktop. Open it and recover the files required - re - delete the folder.

    @ Palcouk... you can actually retrieve files deleted, even when they are home to recycle the locker to restore a previous version of the folder parent; These come available restore points so not always guaranteed, but he made the most of the time if action is taken quickly enough. :) Ric

  • With audio slideshow created in PSE 9 plays well in edit.  When brought to burn items from the Prime Minister for the dvd, the audio does not play.  He appears in the edition, but no sound is played.  It happens regularly.  What setting could be wrong?

    With audio slideshow created in PSE 9 plays well in edit.  When brought to burn items from the Prime Minister for the dvd, the audio does not play.  He appears in the edition, but no sound is played.  It happens regularly.  What setting could be wrong?

    Thank you very much!   At your suggestion, I've selected out, burn to disc, DVD.  A window shows requiring Save have *.wmv.  OK, reluctantly saves.  Automatically opens first.  Preview has no audio.

    Instead of burning to disc, I chose Edit in first.  The preview has the video and audio.  Engraving option asked under wmv.  BUT by selecting the tab burn, then disc, dvd, part took place smoothly and dvd resulting contains actually the audio and the video.  Yes!

    She should not be incompatible and hard, but I could never have succeeded without help.

    Thanks again.

  • Entry of automation of a text file

    Hello

    I was looking for an example of how workflow Orchestrator could read a text file for input in a provisioning workflow parameters.

    Ideally, I would like to place all the parameters necessary to configure a new virtual machine from a template in a text file.  When the workflow runs, it looks to this text file and create the new virtual machine.

    Any suggestions?

    Thank you

    If you use an xml file, you can do:

    var myXml = new XML (fileContent);

    And then drill down to access the values as explained in this tutorial.

    Christophe.

  • Writing a single line of numbers in a text file or write several lines each iteration?

    Hello

    I am currently working on an application that has a few different time-loops at the same time. A single loop acquires data (DAQloop), another shows the data (raw and processed data) on graphs (Graphsloop) and another stores data in an open (Storageloop) ascii text file.

    The data is passed to the DAQloop to the Storageloop through a queue. Now, I leave the Storageloop take the first element of the queue (oldest) to store in the text file each iteration. However, I was wondering if it would be better to let the Storageloop take all items currently available in the queue store at once.

    Does anyone have ideas on this? Who better its? The text file is already open and is simply passed as a refnum.

    THX!

    With normal file primitives LabVIEW, you will get your best speed of disc when you write about 65 000 bytes of disk at once (or read, incidentally).  When I write a similar code, I included a string buffer in the loop of Scripture.  Whenever I get data to write, I add it to the chain.  When the chain hits 65 000 bytes, I write to disk.  You could break this into three loops, as well - a read buffer, and write.  Depending on the current size of piece, you could see a change in the order of magnitude of the speed of disk write.  This write operation is often limited by the conversion from binary to ASCII, not the disk i/o.  If you do this, be careful with your buffer.  You can get some serious slowdowns depending on how you implement it.  This post has some details and examples.

  • Reading text file takes a long time after the first time

    Dear experts LabVIEW,

    I'm having a problem with playback of text file. I'm reading only each Nth line from a file to preview with this sub vi:

    I seems to work the first time I do it well. The loop takes almost no time to perform an iteration.

    Then when I load the same file with exactly the same parameters an iteration takes about 50ms.

    Subsequent attempts always seem to take longer execution time.

    Only when I restart the calling vi fast for a single file.

    When executing the sub vi alone it is still fast, but I don't see how the main vi (too complex to post here) could hinder the execution of the Sub vi.

    I have no one else to open the file in the main vi, I do not use too much memory...

    Just now I have not now where to look. Does anyone have an idea?

    Concerning

    Florian


  • What happens in a batch file when you try to redirect the output of a command in a text file? How did it break the lot?

    I have a lot that downloads the files, and I want to redirect the output to a text file.  The lot is set up similar to the following:
    Set ftp = c:\ftp.txt
    hdir = Set / mydir
    Define ldir = c:\temp
    echo open monsite.org > ftp %
    echo user > ftp %
    echo pw > ftp %
    echo get myfile.txt > ftp %
    echo mget my*.dat > ftp %
    to echo bye > ftp %
    -I - s FTP: ftp % > "c:\temp\ftp.log."

    This lot works perfectly if I redirect the output of the ftp command, but, when I redirect the output, I get a logfile with 3 lines as follows:
    no connection
    mget my*.dat
    Good bye

    I tried the commands different redirect, with undesired results
    > & (which causes only the batch to close by anything in the logs)

    Why is - what this redirect would break the batch and the ftp script in particular?

    This is now fixed; was a simple mistake really, but thanks for all the help anyway.

  • Update the text file app/native/assets/data/in the workspace?

    I'm having a problem with updting a compressed file that is updated via a Web service.

    It is pretty simple what I'm doing. first wait for the answer

    QNetworkReply * response = qobject_cast(sender());

    check the data, etc.

    location of the file is "app/native/assets/data/somefilename.txt".

    QFile file (type);
    If (file.exists ()) {}

    leader. Open(QIODevice::WriteOnly |) QIODevice::Text);
    QTextStream out (&file);)
    off<>

    leader. Close();

    }

    It works fine on my local machine when I run it on my Z30 by momentics.

    But once I have add to my BES server and pull down on my workspace, the file is not updated. I can see the file updated in the application is correct the only thing is that the file not updated text.  From what I see the "app/native/assets/data / ' is read-only.

    My question is how update you text files that were packaged in the instalation of the app "app/native/assets/data / '?

    Thanks in advance

    It is not possible, assets / is read only when the application is deployed to the device, it is only readwrite on Simulator. data / folder can be used instead.

    Optionally, the file may initially active resident / and can be manually copied to data / on the first start of the application. After that it can be updated in the data / folder.

Maybe you are looking for

  • SAMSUNG SSD 850 helps Pro

    Hello I recently bought and installed the Samsung SSD 256 GB 850 Pro in my mid-2012 13 "MacBook Pro.  Everything seems to work very well; However, when I run the speed test of black magic, I get only between 30-100 read and write speed of 100-250. Th

  • Satellite A100-906 cannot boot from CD

    Hello I have Satellite A100-906 and can not boot from the CD. I have not now what problem. I want recovery my pc, but do not boot cd and I tried another CD of Windows and seems to be a problem. I get a DVD Super Multi drive _usb_ but does not have sa

  • HP Officejet 6110 printer does not print correctly

    Original title: my HP Officejet 6110 printer My HP Officejet 6110 has started smearing it prints, I changed the cartridge has a new HP 56 and that it has not cured the problem. Any suggestions?

  • SERV DELL R220 - initializing iSCSI

    Hello I'm going to buy: SERV DELL R220, E3-1220v3 (3.1 GHz), 8 GB UDIMM, 2x1To 2.5 7.2 K 6Gbps SATA HD, iDRAC7 Express, PERC H310, 3YProSupport. DELL_SVR_R220C, 30230601C_R220 Is it possible to start MS Win 2012 from the NAS via iSCSI? Is it supporte

  • problem with the trash

    Hi from Greece.I cannot find the properties of the trash and shows that they are not available and I can't change the icon to the trash. I've found with most of the security I was hitted by two Trojan horses with names (1) TrojanDownloader:Win32 / Re