Jump to content
xisto Community
WeaponX

Renaming Files (Using Excel Spreadsheet)

Recommended Posts

Thanks seec77. That worked perfectly :D

Just one last question. Can I undo the rename manually (ctrl+z) if I find out that there was a mistake? I just tried it and don't think it's working.

I just posted that other question on VB6 over here. If you can help me out on that one also, that would be great :unsure:

Thanks again for all the help.

Share this post


Link to post
Share on other sites

hello guys,i know this topic is very old, but it kind of describes perfect what i am looking for at the moment. i only have one important problem... the code doesnt seem to work for me... my VBE in excel is keep on saying me that custom type FSO is not defined...i think this script is exactly what im looking for but i can't try it, because the script doesnt work proper... it doesnt work at all...to describe the problem that i have: i want to rename *.JPG files with the fixed structure of something like '007_97_001.JPG'. the new names of the files are located in an excel sheet in one column...like i would have in a folder:007_97_001.JPG007_97_002.JPG007_97_003.JPGand i have a column in excel:measure_control1watermeter3waterpump11now i want to rename the old files in:measure_control1.JPGwatermeter3.JPGwaterpump11.JPGit would be really nice if anyone can answer <_<greetingsStefan

Share this post


Link to post
Share on other sites

Hi Stefan and welcome to Xisto.

 

The script created by seec77 was a lifesaver for me. I'm still using it very frequently to this day <_<

 

You need to look at two areas in the script:

 

Match = "Budget"Set FilesDir = FSO.GetFolder("C:\yotam\temp\renamefiles\test\")

For the Match part, in your case enter something like 007. That should be more than enough since I'm assuming ALL your files in THAT folder starts with 007 right? Keep in mind that if you have any other files that are different like 008, it will NOT rename that file. So make sure they are following some pattern.

 

After that part, you need to tell it what folder you have it in. So if you have all those JPGs in c:\images, enter that into the double quotes for the Set FilesDir line.

 

Once that's done, close the visual basic editor window. Hit Alt+F8 to bring up the Macros window. Double click on the macro to run it.

Share this post


Link to post
Share on other sites

Copy and Rename files in folder using Excel Macro

Renaming Files (Using Excel Spreadsheet)

 

Hi,

 

 

 

I have a folder say see:test which has many files. Using Excel I want to copy all files starting with A*.* to B*.* (Note I want to copty and not rename as I would like to retain all the files which start with A*.*)

 

 

 

Can anyone please help.

 

 

 

-Summer

Share this post


Link to post
Share on other sites

Macro to search the desired worksheet and load data to another worksheet

Renaming Files (Using Excel Spreadsheet)

 

Dear Experts,

 

I am very new to Macros. As such I wished to automate a Quality Check (QC) Report. There is a folder on our server where all the monthly QC files are saved. I want to run a macro to create a report of daily total volumes cleared vs internal errors identified vs external errors identified. The moment the run button is clicked it should ask "For which month" And whichever month I type, it should open the folder containing the QC files and search for the title of the QC files and open the required file. The first report in this report file is a daily report. The same report I want staffwise. The staff names are stored in the QC file in validation. So if there is a new staff getting added this new staff details should appear in the report through this macro only where in the macro searches the validation for the last staff name and if it matches with the existing staff list then ignores else creates the same report format as for the other staff.

 

I hope I will get good help from this site.

Please help as this is a part of a six sigma control phase where we want to create a robust accuracy reporting system with no person dependancy.

 

Thanks and Regards for all your valuable time and advice.

 

-question by Learner

Share this post


Link to post
Share on other sites

renaming jpgs with excel

Renaming Files (Using Excel Spreadsheet)

 

Replying to WeaponX

I'm trying to do the same thing...But my script will not run

The following is highlighted: FSO As FileSystemObject

And it says: user defined type not defined.

 

Any solutions???

Thanks, andrea

 

-question by Andrea

Share this post


Link to post
Share on other sites

Rename a Macro to a the value of a cell

Renaming Files (Using Excel Spreadsheet)

 

I have a very VSB question

 

Here it I I have a monthly workflow that needs to be renamed to the value of cell AG65

 

Here is the expresion I have so far it renames it and saves it into

ChDir "Q:AR - PS Comment_RTP QueueTemplates"

Workbooks.Open Filename:= _

"Q:AR - PS Comment_RTP QueueTemplatesLinked CMT_RTP WorklfowTemplate New.Xls" _

, UpdateLinks:=3

 

Windows("Linked Workflow Template1.Xls").Activate

Windows("Linked CMT_RTP WorklfowTemplate New.Xls").Activate

Windows("Linked Workflow Template1.Xls").Activate

ChDir "Q:AR SupervisorWorkFlowWorkflow 2008"

Range("BC49").Select

ActiveWindow.SmallScroll Down:=-12

ActiveWorkbook.SaveAs Filename:= _

"Q:AR SupervisorWorkFlowWorkflow 2008New AR Workflow.Xls", FileFormat:= _

xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _

, CreateBackup:=False

Windows("Linked CMT_RTP WorklfowTemplate New.Xls").Activate

 

ChDir "Q:AR - PS Comment_RTP Queue"

ActiveWorkbook.SaveAs Filename:= _

"Q:AR - PS Comment_RTP QueueNew CMT_RTP Workflow.Xls", FileFormat:=xlNormal _

, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _

CreateBackup:=Falsedifernte locations but I need it ot rename it as the weeks go on

Instead of "New AR Workflow" I need it to be the value of cell AG65 which would be the begining weekday

 

-reply by robert

Share this post


Link to post
Share on other sites
Macro to compare two excel filesRenaming Files (Using Excel Spreadsheet)

Hi Experts,

Am undergoing a project in Excel and I need a macro to Automate my job.

I need to compare two Excel files. One containing the with values in the second column I.E, in Column B (range 3:255) for eg . Table.Xls and another excel file containing the orginal values in row wise I.E, (range B3:M3) for eg. Original .Xls. And the original .Xls excel file has Several Sheets. I need a macro to compare the values in the first sheet of original .Xls with the vales in the Table.Xls. If it is matched a massage box should be shown as "Values Matched" or "Values Not Matched". It should be done for all the Sheets.

I hope I will get good help from this site.

Please Help me as soon as possible

Thanks

jagadesh

-question by jagadesh

Share this post


Link to post
Share on other sites
Need to check whether a particular link is active in a workbookRenaming Files (Using Excel Spreadsheet)

Hi all,

my file is linked to many other excel file, which needs to be changed every month with different filename thru edit link. So

I need a macro code which can helps me to check whether a particular path&filename is linked in the workbook. If the link is acive I can change it thru edit link code in macro. If not active or if couldnot find the link it can be ignored.

Prabhu

Share this post


Link to post
Share on other sites
EXCEL Macro/VBA helpRenaming Files (Using Excel Spreadsheet)

Hi,

Although I am good with excel I can't do crap with Macros other than record them.  Can a macro be written to find certain data and move the entire row to another sheet in the same workbook?  I can't just record one because each month the data I need is in a different row when I get the report.

For example, I need the row of information with code 8MG to be pulled from the list and cut or copied to row, whatever, we'll say row 4 in the next sheet over.  Then I need it to do the same for the row of information with code 8C4 to other sheet row 5…and so on.  My issue is the codes mentioned fall into different rows each time the original report is printed.  ARGHHH!  /txtmngr/images/smileys/smiley5.Gif

Thanks,

Lou

Share this post


Link to post
Share on other sites
Dynamically renaming files within a folderRenaming Files (Using Excel Spreadsheet)

I have one folder with some image files in it...I need to dynamically rename the files ,w.Rto the data in an excel.

e.G.

I'm having one excel sheet with the following data

Market Code Market Name

500   Boston

505 Atlanta

600 albany

etc...

 

The Image files in the folder are stored in the name of "Market Name" (e.G. Boston.Jpg)  .I need to Rename the files w.Rto "Market Code" ( I.E 500.Jpg instead of boston.Jpg).

there are around 270 image files in the folder.

can anyone please suggest a solution for this issue...The solution may be in any technology (Macro, batch file etc)

-reply by poorani

Share this post


Link to post
Share on other sites

Seec77,I wonder if it is possible for your code to over write hyperlinks? What I have is an outdated hyper link a bout 800 of them. I need to change them all to link with files that they are associated with. Columns A1 -A 247 have the names of the files that are associated with them. So lets say cell A1 contains N001, that particular file is located at C:documentstransupdatesN001.Pdf. What I would like it to do is look for that file in the C drive and make it a hyperlink for the cell A1. Do you think it's possible to do that?

Share this post


Link to post
Share on other sites
currency to textRenaming Files (Using Excel Spreadsheet)

I want to convert currency to text just like

2987  =  two thousand nine hundred and eighty seven

if any one can help me in this matter then I shall be very thankful 

-reply by nauman

Share this post


Link to post
Share on other sites
Change file no automatically :Renaming Files (Using Excel Spreadsheet)

Hi ,

I need to know the way to change the file no automatically in excel.Ie;for example if I put a file no as 1 and after I closed and reopen the file I need to change the no automatically to 2. Is there any way for it. 

Please help me.

-reply by Riyazl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.