Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
21 posts
|
how I can import a large amount of csv files with the same variable structure with a command do if or macro. ?
In stata I can do it with command - local and foreach!- Thank
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
2500 posts
|
open a new instance of
SPSS paste the line below into a syntax window, run it.
spssinc process files /help. If the csv files do not have a line with the variable names and if (you have a variable in the file OR it makes no difference which source file cases come from), use your OS to copy all the files into one file in Windows copy all the files into a folder e.g. c:\many\ Create a new folder e.g., c:\allin1\ open a command window enter commands something like this cd c: copy c:\many\*.csv c:\allin1\big.csv Art Kendall Social Research ConsultantsOn 10/15/2013 3:30 PM, Javier Meneses [via SPSSX Discussion] wrote: how I can import a large amount of csv files with the same variable structure with a command do if or macro. ?
Art Kendall
Social Research Consultants |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
3512 posts
|
You can use Art's DOS COPY method even if the files do have variable names in the first row: After merging all of the files via COPY, open with Excel, sort to get all the rows with variable names next to each other, delete all but one of those rows, and then save the modified file.
HTH.
... [show rest of quote]
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Free forum by Nabble | Edit this page |