Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file to a different path
OK I have searched and searched this board and do not see what I need.
I need a very basic macro to save a *.csv file to another Directory. What I am doing is parsing huge amounts of data and saving the parsed file to another directory. I got the macro to do what I want, is the automating I dont get, I eventual want to use a .cmd file to run on the weekend opne each *.csv file parse the data then save this to another dir. for those interested the variables: filename = yyyy-mm-ddwilv.csv ( date is creation date of file from the import) Old dir = Q:\TRS_RAW ( network share btw) new dir = R:\TRS_DATA ( network share) I have been looking but cant find what I want :/ Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a file to a different path
You'd be better off using a different variable for filename, say myFile for
example. myFile = yyyy-mm-ddwilv.csv Then this will save the file:- ActiveWorkbook.SaveAs Filename:= new_dir + "\" + myFile, _ FileFormat:=xlCSV, CreateBackup:=False "SVTman74" wrote: OK I have searched and searched this board and do not see what I need. I need a very basic macro to save a *.csv file to another Directory. What I am doing is parsing huge amounts of data and saving the parsed file to another directory. I got the macro to do what I want, is the automating I dont get, I eventual want to use a .cmd file to run on the weekend opne each *.csv file parse the data then save this to another dir. for those interested the variables: filename = yyyy-mm-ddwilv.csv ( date is creation date of file from the import) Old dir = Q:\TRS_RAW ( network share btw) new dir = R:\TRS_DATA ( network share) I have been looking but cant find what I want :/ Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
Saving excel backup copy - path? | Excel Discussion (Misc queries) | |||
Can I change ExCels default save path for saving add-ins ? | Excel Programming | |||
Saving using a path | Excel Programming | |||
Saving to a Network Path using VBA | Excel Programming |