1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development I need a program that returns certain numbered files!!

Discussion in 'Software' started by GregTheRotter, 24 Sep 2008.

  1. GregTheRotter

    GregTheRotter Minimodder

    Joined:
    9 Aug 2008
    Posts:
    4,271
    Likes Received:
    88
    Hi guys, I am working at a photographic studio, and when a customer has chosen what images they want prints, I have to go into the folder of raw files, and have to spend ages picking each file and copying and pasting to a new folder. This means me clicking each individual file and copying/pasting to the new order folder, which really takes far too long. Surely there's some way of incorporating either some specific search tool, or excel, or SOMETHING that can speed this process up.

    What I want to be able to do;

    [​IMG]

    Be able to copy and past the file names that the customer has sent to me in the form of a word document so basicly a list of file names,

    drop them into the program, and then have it look for those files in the RAW folder, and copy them so that I just have to click 'paste' in the folder I chose after.

    Can anyone advise me of a program that can do this? Or else link me to someone who could design something as simple as this :wallbash::worried:
     
  2. Cinnander

    Cinnander What's a Dremel?

    Joined:
    19 Apr 2007
    Posts:
    393
    Likes Received:
    2
    Assuming you're on 2K/XP/Vista (I think), you could use the command line if there's no GUI tools that can do it:
    Code:
    FOR %var IN list DO command
    Where list is a one-filename-per-line list file, command is something to do, e.g.

    Code:
    c:\images> FOR %image in c:\customer\mylist.txt DO copy %image%.jpg c:\customer\
    I haven't tested this.

    On Linux it would be something like
    Code:
    cat /home/you/listfile.txt | while read image; do cp /home/you/images/$image.jpg /home/you/customer/
    Again one image name per line.
     
  3. GregTheRotter

    GregTheRotter Minimodder

    Joined:
    9 Aug 2008
    Posts:
    4,271
    Likes Received:
    88
    Yeah I need something that reads the file names from a txt file and batch copies the files in one go. I'm having to sift through 600+ images here to retuen 100.
     
  4. BentAnat

    BentAnat Software Dev

    Joined:
    26 Jun 2008
    Posts:
    7,230
    Likes Received:
    219
    yup... command prompt could do this, so could a small VB/C# app... should take an experienced coder all of half an hour to create
     
  5. GregTheRotter

    GregTheRotter Minimodder

    Joined:
    9 Aug 2008
    Posts:
    4,271
    Likes Received:
    88
    yeah, thats the thing, I have no clue about programming.. Anyone willing to make something like this for me? How much $$ ?
     
  6. sierra42

    sierra42 sanity rules, but not here

    Joined:
    13 Oct 2008
    Posts:
    7
    Likes Received:
    0
    code example c#

    Try something along the lines of the following:


    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;
    namespace FileExtractor
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void BtnCopy_Click(object sender, EventArgs e)
            {
                string inputDir = string.Empty;
                string outputDir = string.Empty;
                string fileCollectionText = string.Empty;
    
                //get variables (might want to add error handling)
                fileCollectionText = tbxFileCollection.Text;
                inputDir = tbxSrc.Text;
                outputDir = tbxOut.Text;
    
                //read the input file
                string[] FileCollection = File.ReadAllLines(fileCollectionText);
    
                //for each line of the file copy the item to the output dir
                foreach (string line in FileCollection)
                {
    //add correct formatting to the input filename and directory by adding a slash...
                    File.Copy(inputDir + @"\" + line, outputDir + line);
                }
                
            }
        }
    }
    
    it is not the most tidy things in the world, if you want it neatened up let me know, i can always dump the complete file on my website come the weekend and link you to it.

    hope that helps.
     

Share This Page