Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    50

    Rename multiple files?

    How can i rename a multiple files in 1 folder to one name?

    I was try to use in this command:
    Code:
    File.Rename("AutoPlay\\Images\\*.jpg", "AutoPlay\\Images\\name.jpg");
    But its dont works.

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    I don't understand what it is you are trying to do here. Are you wanting to rename all the files in a particular location to a common name/numbering scheme. The way your question is worded it seems like you want to take all .jpg files and rename them all "name.jpg", which would in effect only leave you with one file named name.jpg, the last one.

    You can use File.Find to fine all the .jpg files in a directory, this returns a table of all the files.

    tFiles = File.Find(details here)

    You can then use a for loop to go through eacy item and rename them the way you want.

    for i,v in tFiles do
    File.Rename(v, "path\\name"..i..".jpg")
    end

    HTH
    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. Playing Multiple Audio Files in Sequence
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 6
    Last Post: 08-15-2005, 03:38 PM
  2. playing Multiple video files in a LOOP
    By Stan Hamers in forum AutoPlay Media Studio 5.0
    Replies: 11
    Last Post: 05-21-2005, 02:14 PM
  3. rename multiple files
    By jenny62 in forum Setup Factory 6.0
    Replies: 1
    Last Post: 04-13-2004, 01:25 PM
  4. Playing Multiple Video Files in Sequence
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 11:10 AM
  5. Use source sub-tree as destination sub-tree on multiple files
    By roofrack in forum Setup Factory 6.0
    Replies: 1
    Last Post: 08-27-2003, 07:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts