Transfer of all files in a directory tree using FTP adapter?

Hi,
I'm looking for a solution to transfer a whole directory tree, including the content, from one location to another using the FTP adapter.
Is there an easy way to accomplish this?
Any help would be appreciated.
Thanks
Sigrid

Hi Sigrid,
I'm just wondering on the need to do that using SOA. Is it a regular transfer or one time?
There's a way to move a single file from one FTP location to another on the same or different FTP server (link to the cases). But in order to move all the files in a directory, you'll have to loop this. The high level steps will be:
- List all the files recursively that are present in your directory using File List operation
- Implement the MOVE file operation (or COPY operation) of the FTP Adapter
- Invoke this MOVE operation in a while loop and pass the file names, as gathered from the File List operation, one by one to MOVE operation
You can also use single Java Embedding activity and call a Java class that does the File Transfer but depends on your requirements.
Let us know how you get along.
Regards,
Neeraj Sehgal

Similar Messages

  • HTML  Parsers and reading all files in a directory

    Hello all,
    I was wondering if there was a html parser included in java. I am writing a program where I want to be able to search all the files in a directory tree for a particular string. I was able to read one file in a single directory but not in any other directory. How would I go about writing code to be able to access all files in directory that has multiple sub folders.
    Also, when I started to write my program I tried to use the DOM XML Parser to parse my html page. My logic behind this decision was that if you look at html code it is an xml document. But as I was trying to run my program I noticed that I had to convert my html document into xml format. I really don't want to have to build my own html parser. Is there a html parser that is included in Java. Oh my program is just your basic text program. No interfaces.
    Thanks for any help that you can provide
    Hockeyfan

    a particular string. I was able to read one file in
    a single directory but not in any other directory.
    How would I go about writing code to be able to
    access all files in directory that has multiple sub
    folders.
    You can do that several ways.
    Most likely you'll end up with some sort of recursive iteration over the directory tree.
    Not hard to write, somewhat harder to prevent memory problems if you end up with a lot of data.
    Also, when I started to write my program I tried to
    use the DOM XML Parser to parse my html page. My
    logic behind this decision was that if you look at
    html code it is an xml document. But as I was
    trying to run my program I noticed that I had to
    convert my html document into xml format. I really
    don't want to have to build my own html parser. Is
    there a html parser that is included in Java. Oh my
    program is just your basic text program. No
    interfaces.
    A VALID xhtml document is a valid XML document.
    Problem is that most HTML isn't xhtml.
    Another problem is that most HTML is fundamentally broken even to its own standards (which have always been based on SGML on which XML is also based).
    Browsers take that into account by being extremely lax on standards compliance and effectively making up tags as they go along to fill in the missing ones in the trees they parse.
    That's however not a standardised process and each browser handles it differently (and as a result most html will render differently in different browsers).
    Java contains a simple HTML parser in Swing, but it's primitive and will only parse a subset of HTML 2.0.
    There are almost certainly 3rd party libraries out there that can do better, both free and/or commercial.

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • List all files in a directory on a server that hosts the applet

    Hei :)
    I have a problem. I want to list all files in a directory on my server. ( http://www.foo.bar/tw )
    The applet is in the root folder ( http://www.foo.bar ).
    So i tried it like this
    File fi = new URL(getCodeBase() + "/all/").getFile();But when I try to list the files, I get a SecurityException.
    Can anyone help me out?
    Peace!
    LoCal

    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=&qt=%2Blist+%2Bfile+%2Bserver

  • Finder not displaying all files in remote directory

    Sorry, this is a repost as I have gotten no response from my original request here: Finder not displaying all files in remote directory
    I've exported pictures from iPhoto on my iMac to a shared directory on my mac mini. When I access that directory from my iMac, I can see some but not all of the pictures. I know the pictures exported properly because I can see them all from the mac mini. I can open up a terminal window on my iMac and see all of the files; I can also open those files from the terminal.
    I'm running OSX 10.9.4 on both computers, with the mac mini also running OSX Server. I've placed a screen grab below from my iMac of what Finder sees vs what I can see from the terminal.
    Why isn't Finder displaying all of my files?

    thanks for responding
    Adding a new file to the shared folder results in me being able to see the new file from my clients regardless of where it was added from, however the "hidden" files do not suddenly pop up.
    I tried a few more experiments that had interesting results, but still didn't lead me to an answer.
    First I tried copying the files from the remote directory to a local directory; I did this in 2 different ways and had different results. Method A) I copied files from the mounted share to a local dir: "cp /Volumes/MyShare/dir/*.JPG .". Method B) I copied the files using secure copy: "scp user@server:/path/to/dir/*.JPG .".
    Method A resulted in Finder not being able to see the files in the local directory, while Method B did. This was interesting and lead me to suspect an issue with the way I am sharing the directory on the server. From Server settings I have both afp and smb checked. I tried enabling only one or the other and reconnecting; but this did not fix the problem.
    Next I tried exporting the photos from iPhoto again. Exporting them locally results in files that Finder can see. Exporting them to my server results the same bad behavior
    Getting desperate, I also tried renaming all of the files from "*.JPG" to "*.jpg" but this didn't help.
    One last experiment, I see the same behavior from both another Mac and a PC on my local network... FTP works fine.
    Any more ideas?

  • Is there any way to play all files in a directory by one url?

    Hi all,
    I am testing fms this days, I have put all my files(such as 1.mp3,2.mp3...n.mp3) in my directory.
    I can play single file fine with url like this:
    rtmp://localhost/mp3/mp3:x/2
    but i want to know is there any way to play all files in my direcotry?
    for example, user click the play button, the player(smp) automatic plays all files in the directory, link windows media server.
    Should I use playlist? Or there is another better way?
    Thanks a lot.

    Hi,
    FMS do not directly take a directory to play files, the file names have to be fetched some way (through script if needed) to make a playlist and then the play command needs to be repeated as many times.
    Thank you !

  • How to remove all files in a directory in java?

    I have tried method delete() of File ,
    but no effect!
    can anyone help me!
    thank you

    So, you have a directory and you want to delete all files in the directory. Here is some (untested) code:
    File dir = new File("C:\\tempdir");
    File[] files = dir.listFiles();
    for (int i = 0; i < files.length; ++i) {
      if (files.isFile()) {
    files[i].delete();
    Jesper

  • Load all files in a directory

    hi all! im new to java and i was wondering if u can help me out!
    ive wrote a small application which analysises words in a text file, and what i need to do is load all the files in a directory, rather than one at a time like in the following code. I understand that a loop is needed but i really dont know where to start! please help!
    thanks for your time
    oh also, is there a way of the system printing the filename rather than "this text is.."?
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.HashMap;
    public class eval {
    private String[] words;
    private int[] values;
    private int num;
    private HashMap <String, Integer> hashMap;
    private arrays a;
    private String[] negwords;
    private int[] negvalues;
    private HashMap hashMap2;
    private int negnum;
    public eval() {
    initiatemap();
    BufferedReader in = null;
    try {
    in = new BufferedReader (new FileReader ("text.txt")); //id like this to load all files in a directory
    String str;
    String s;
    while ((str = in.readLine()) != null)
    str = str.replaceAll("[\\p{Punct}&&[^?????????????????????]]", " ");
    String[]temp = str.split(" ");
    for (int i = 0; i < temp.length; i++) {
    if (hashMap.containsKey(temp)) {
    num++;
    for (int i = 0; i < temp.length; i++) {
    if (hashMap2.containsKey(temp[i])) {
    negnum++;
    if (num > 0 && negnum > 0 ){
    double total = num + negnum;
    double txt1 = round((num/total)*100, 2);
    if (txt1 < 50)
    System.out.println("This text is " + txt1 + "% positive and is therefore not a happy text.");
    else if (txt1 >= 50 && txt1 <=65)
    System.out.println("This text is " + txt1 + "% positive, but does contain " + (100 - txt1) + "% negative words, it is therefore probably not a happy text.");
    else if (txt1 > 65)
    System.out.println("This text is " + txt1 + "% positive, and is therefore a happy text.");
    in.close();
    catch (FileNotFoundException e) {
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    public static double round(double val, int places) {
    long factor = (long)Math.pow(10,places);
    // Shift the decimal the correct number of places
    // to the right.
    val = val * factor;
    // Round to the nearest integer.
    long tmp = Math.round(val);
    // Shift the decimal the correct number of places
    // back to the left.
    return (double)tmp / factor;
    public void initiatemap()
    a = new arrays();
    words = a.initiateWords();
    negwords = a.initiateNegWords();
    values = a.initiateValues();
    negvalues = a.initiateNegValues();
    hashMap = a.initiateMap();
    hashMap2 = a.initiateNegMap();
    for (int i = 0; i < words.length; i++) {
    hashMap.put(words[i], values[i]);}
    for (int j = 0; j < negwords.length; j++) {
    hashMap2.put(negwords[j], negvalues[j]);}
    public static void main(String[] args) {
    eval eval = new eval();

    hi again,
    ok thanks for the help, ive have made the changes and i am now getting results.. however the results aren't correct!
    if i load the texts in one at a time, i get entirely different results to what is being printed. any suggestions?
    thanks again, i really really appreciate your help
    Torre
    private static void readMultipleFilesFromADirectory()
    File directory = new File(multipleFilesDirectory);
    // just to double check that this is a directory
    if (directory.isDirectory())
    File[] allFilesWithinThisDirectory = directory.listFiles();
    BufferedReader in = null;
    for (File file: allFilesWithinThisDirectory)
    initiatemap();
    try {
    in = new BufferedReader (new FileReader (file));
    String str;
    String s;
    while ((str = in.readLine()) != null)
    str = str.replaceAll("[
    p{Punct}&&--^&aacute;&acirc;&atilde;&auml;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&ograve;&oacute;&ocirc;&ouml;&ugrave;&uacute;&ucirc;&uuml;&ccedil;&egrave;]--", " ");
    String[]temp = str.split(" ");
    for (int i = 0; i < temp.length; i++) {
    if (hashMap.containsKey(temp)) {
    num++;
    for (int i = 0; i < temp.length; i++) {
    if (hashMap2.containsKey(temp[i])) {
    negnum++;
    if (num > 0 && negnum > 0 ){
    double total = num + negnum;
    double txt1 = round((num/total)*100, 2);
    if (txt1 < 50)
    System.out.println(file + " is " + txt1 + "% positive and is therefore not a happy text.");
    else if (txt1 >= 50 && txt1 <=65)
    System.out.println(file +" is " + txt1 + "% positive, but does contain " + (100 - txt1) + "% negative words, it is therefore probably not a happy text.");
    else if (txt1 > 65)
    System.out.println(file +" is " + txt1 + "% positive, and is therefore a happy text.");
    in.close();
    catch (FileNotFoundException e) {
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    results:
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv416_11136.txt is 60.65% positive, but does contain 39.35% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv417_13115.txt is 60.66% positive, but does contain 39.34% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv418_14774.txt is 60.68% positive, but does contain 39.32% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv419_13394.txt is 60.69% positive, but does contain 39.31% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv420_28795.txt is 60.66% positive, but does contain 39.34% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv421_9709.txt is 60.65% positive, but does contain 39.35% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv422_9381.txt is 60.69% positive, but does contain 39.31% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv423_11155.txt is 60.69% positive, but does contain 39.31% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv424_8831.txt is 60.67% positive, but does contain 39.33% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv425_8250.txt is 60.67% positive, but does contain 39.33% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv426_10421.txt is 60.69% positive, but does contain 39.31% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv427_10825.txt is 60.66% positive, but does contain 39.34% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv428_11347.txt is 60.68% positive, but does contain 39.32% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv429_7439.txt is 60.69% positive, but does contain 39.31% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv430_17351.txt is 60.68% positive, but does contain 39.32% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv431_7085.txt is 60.67% positive, but does contain 39.33% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv432_14224.txt is 60.67% positive, but does contain 39.33% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv433_10144.txt is 60.66% positive, but does contain 39.34% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv434_5793.txt is 60.63% positive, but does contain 39.37% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv435_23110.txt is 60.62% positive, but does contain 39.38% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv436_19179.txt is 60.68% positive, but does contain 39.32% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv437_22849.txt is 60.69% positive, but does contain 39.31% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv438_8043.txt is 60.65% positive, but does contain 39.35% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv439_15970.txt is 60.68% positive, but does contain 39.32% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv440_15243.txt is 60.66% positive, but does contain 39.34% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv441_13711.txt is 60.64% positive, but does contain 39.36% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv442_13846.txt is 60.61% positive, but does contain 39.39% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv443_21118.txt is 60.61% positive, but does contain 39.39% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv444_9974.txt is 60.6% positive, but does contain 39.4% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv445_25882.txt is 60.56% positive, but does contain 39.44% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv446_11353.txt is 60.54% positive, but does contain 39.46% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv447_27332.txt is 60.54% positive, but does contain 39.46% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv448_14695.txt is 60.56% positive, but does contain 39.44% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv449_8785.txt is 60.55% positive, but does contain 39.45% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv450_7890.txt is 60.54% positive, but does contain 39.46% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv451_10690.txt is 60.54% positive, but does contain 39.46% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv452_5088.txt is 60.53% positive, but does contain 39.47% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv453_10379.txt is 60.56% positive, but does contain 39.44% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv454_2053.txt is 60.55% positive, but does contain 39.45% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv455_29000.txt is 60.55% positive, but does contain 39.45% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv456_18985.txt is 60.57% positive, but does contain 39.43% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv457_18453.txt is 60.53% positive, but does contain 39.47% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv458_8604.txt is 60.53% positive, but does contain 39.47% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv459_20319.txt is 60.5% positive, but does contain 39.5% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv460_10842.txt is 60.54% positive, but does contain 39.46% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv461_19600.txt is 60.48% positive, but does contain 39.52% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv462_19350.txt is 60.47% positive, but does contain 39.53% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv463_10343.txt is 60.49% positive, but does contain 39.51% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv464_15650.txt is 60.48% positive, but does contain 39.52% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv465_22431.txt is 60.46% positive, but does contain 39.54% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv466_18722.txt is 60.46% positive, but does contain 39.54% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv467_25773.txt is 60.45% positive, but does contain 39.55% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv468_15228.txt is 60.47% positive, but does contain 39.53% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv469_20630.txt is 60.42% positive, but does contain 39.58% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv470_15952.txt is 60.39% positive, but does contain 39.61% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv471_16858.txt is 60.4% positive, but does contain 39.6% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv472_29280.txt is 60.4% positive, but does contain 39.6% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv473_7367.txt is 60.38% positive, but does contain 39.62% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv474_10209.txt is 60.38% positive, but does contain 39.62% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv475_21692.txt is 60.42% positive, but does contain 39.58% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv476_16856.txt is 60.43% positive, but does contain 39.57% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv477_22479.txt is 60.48% positive, but does contain 39.52% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv478_14309.txt is 60.47% positive, but does contain 39.53% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv479_5649.txt is 60.44% positive, but does contain 39.56% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv480_19817.txt is 60.45% positive, but does contain 39.55% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv481_7436.txt is 60.43% positive, but does contain 39.57% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv482_10580.txt is 60.43% positive, but does contain 39.57% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv483_16378.txt is 60.44% positive, but does contain 39.56% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv484_25054.txt is 60.43% positive, but does contain 39.57% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv485_26649.txt is 60.45% positive, but does contain 39.55% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv486_9799.txt is 60.44% positive, but does contain 39.56% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv487_10446.txt is 60.42% positive, but does contain 39.58% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv488_19856.txt is 60.41% positive, but does contain 39.59% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv489_17906.txt is 60.4% positive, but does contain 39.6% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv490_17872.txt is 60.42% positive, but does contain 39.58% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv491_12145.txt is 60.44% positive, but does contain 39.56% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv492_18271.txt is 60.44% positive, but does contain 39.56% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv493_12839.txt is 60.43% positive, but does contain 39.57% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv494_17389.txt is 60.43% positive, but does contain 39.57% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv495_14518.txt is 60.41% positive, but does contain 39.59% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv496_10530.txt is 60.39% positive, but does contain 39.61% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv497_26980.txt is 60.39% positive, but does contain 39.61% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv498_8832.txt is 60.38% positive, but does contain 39.62% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv499_10658.txt is 60.38% positive, but does contain 39.62% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv500_10251.txt is 60.37% positive, but does contain 39.63% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv501_11657.txt is 60.34% positive, but does contain 39.66% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv502_10406.txt is 60.33% positive, but does contain 39.67% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv503_10558.txt is 60.35% positive, but does contain 39.65% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv504_29243.txt is 60.35% positive, but does contain 39.65% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv505_12090.txt is 60.3% positive, but does contain 39.7% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv506_15956.txt is 60.32% positive, but does contain 39.68% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv507_9220.txt is 60.3% positive, but does contain 39.7% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv508_16006.txt is 60.31% positive, but does contain 39.69% negative words, it is therefore probably not a happy text.
    C:\Users\Torre\Desktop\panglee\txt_sentoken\pos\cv509_15888.txt is 60.39% positive, but does contain 39.61% negative words, it is therefore probably not a happy text.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

  • Creating an action that treats all files in a directory

    How can I make an action which changes the picture size and resolution for all files in a directory and saves the new versions of the files in a subdirectory?
    Thanks

    Macro Details wrote:
    First create your Sub directory. Then start the Action. Open file, Resisize save as (to Sub directory) then close the file.
    Now: File- Automate-Batch. Select your action and your folders and overide the open Command and the Save As Command.
    Frankly Norbert I think the Image processor way is easier but to each his own as they say.  

  • Deleting all files in a directory

    Hi,
    Is it possible to use cffile to delete all files in a
    directory. I have a function that creates a file in seperate parts
    and places the finished file into a folder. But I need a check to
    delete all files currently existing in said folder. I understand it
    is possible to query a folder for existing files and then use that
    query with cffile to delete the files... I just don't know how to
    do it.
    Thanks for your help

    I am not postivie, but I think I recall learning that the
    delete all function is prohibited via CF. You can delete specific
    files, though.
    If this is, in fact, the case, you could query the directory,
    and then loop through the resultant query, deleting each file one
    at a time.

  • [Bash] Massively replace text in all files of a directory

    Hi everybody,
    I wrote this small recursive function in order to massively replace some strings contained in all files of a directory (and all subdirectories). Any suggestions?
    replaceText() {
    # set the temporary location
    local tFile="/tmp/out.tmp.$$"
    # call variables
    local script="$2"
    local opts="${@:3}"
    browse() {
    for iFile in "$1"/*; do
    if [ -d "$iFile" ];then
    # enter subdirectory...
    browse "$iFile"
    elif [ -f $iFile -a -r $iFile ]; then
    echo "$iFile"
    sed $opts "s/$(echo $script)/g" "$iFile" > $tFile && mv $tFile "$iFile"
    else
    echo "Skip $iFile"
    fi
    done
    browse $1
    Syntax:
    replaceText [path] [script] [sed options (optional)]
    For example (it will replace "hello" with "hi" in all files):
    replaceText /home/user/mydir hello/hi
    Note: It is case-sensitive.
    Bye,
    grufo
    Last edited by grufo (2012-11-10 15:05:43)

    falconindy wrote:
    Yes, find is recursive and extremely good at its job.
    http://mywiki.wooledge.org/UsingFind
    Well
    falconindy wrote:Your lack of quoting is dangerous, as is your code injection in sed. I'm not sure why you're echoing a var inside a command substitution inside a sed expression, but it's going to be subject to word splitting, all forms of expansion, and may very well break the sed expression entirely, leading to bad things. A contrived example, but passing something like 'foo//;d;s/bar/' should effectively delete the contents of every file the function touches.
    So, if you consider it dangerous, you can adopt the whole "sed syntax" and confirm before continue...:
    replaceText() {
    # set the temporary location
    local tFile="/tmp/out.tmp.$$"
    # call variables
    local sedArgs="${@:2}"
    browse() {
    for iFile in "$1"/*; do
    if [ -d "$iFile" ];then
    # enter subdirectory...
    browse "$iFile"
    elif [ -f $iFile -a -r $iFile ]; then
    echo "$iFile"
    sed $sedArgs "$iFile" > $tFile && mv $tFile "$iFile"
    else
    echo "Skip $iFile"
    fi
    done
    while true; do
    read -p "Do you want to apply \"sed $sedArgs\" to all files contained in the directory $1? [y/n] " yn
    case $yn in
    [Yy]* ) browse $1; break;;
    * ) exit;;
    esac
    done
    Syntax:
    replaceText [parent directory] [sed arguments]
    Example:
    replaceText /your/path -r 's/OldText/NewText/g'
    or, if you want to work directly with the current directory...
    replaceText() {
    # set the temporary location
    local tFile="/tmp/out.tmp.$$"
    # call variables
    local sedArgs="$@"
    browse() {
    for iFile in "$1"/*; do
    if [ -d "$iFile" ];then
    # enter subdirectory...
    browse "$iFile"
    elif [ -f $iFile -a -r $iFile ]; then
    echo "$iFile"
    sed $sedArgs "$iFile" > $tFile && mv $tFile "$iFile"
    else
    echo "Skip $iFile"
    fi
    done
    while true; do
    read -p "Do you want to apply \"sed $sedArgs\" to all files contained in the directory $PWD? [y/n] " yn
    case $yn in
    [Yy]* ) browse $PWD; break;;
    * ) exit;;
    esac
    done
    Syntax:
    replaceText [sed arguments]
    Example:
    replaceText -r 's/OldText/NewText/g'
    What about?
    falconindy wrote:I'll also point out that declaring a function within a function doesn't provide any amount of scoping -- 'browse' will be declared in the user's namespace after running this function for the first time.
    See:
    function1() {
    function2() {
    echo "Ciao"
    function2
    function2 # error
    function1 # works

  • Reading Files from client directory folder using servlets or struts.

    HI All,
    Could you please help me out int the below query.
    I want read all files from paricular directory folder from the client machine in web application. I am able to do it from my local machine. but when I am try to do it from some other machine I am not able to get the file list.
    It is very urgent ..please hep me ASAP.

    It should be problem with the file permissions in your client machine ???Hardly.
    @OP: a servlet executes at the server. It doesn't haved any access whatsoever to the client machine.

  • File format conversion of Target file using FTP adapter

    Hi All,
    I am using FTP adapter to create the file on the Target side. But file needs to below format : How do i conver the XML File fomat( Default generate by XI ) to be generat to below file format;
    000000000000154162,
    CWC1A,,,,
    CWC1B,,,,
    CWC2A,,,,
    CWC2B,,,,
    Please provide your suggestion;
    thanks;
    MK

    Hi Mohan,
       I have a collection of Blogs (links) which Specify the File content conversion parameters.
    File content conversion, I am Not sure as which Link will Match Your Requirement exactly...
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Please see the below links for file content conversion..
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    File Content Conversion for Unequal Number of Columns
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
    Content Conversion (Pattern/Random content in input file)
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
    Regards,
    Sainath chutke

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

Maybe you are looking for