How can i rename a multiple files in 1 folder to one name?
I was try to use in this command:
But its dont works.Code:File.Rename("AutoPlay\\Images\\*.jpg", "AutoPlay\\Images\\name.jpg");
Professional Software Development Tools
How can i rename a multiple files in 1 folder to one name?
I was try to use in this command:
But its dont works.Code:File.Rename("AutoPlay\\Images\\*.jpg", "AutoPlay\\Images\\name.jpg");
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