Move data field in .csv file

November 3, 2011 at 21:56:20
Specs: Windows XP
I have a text file that is exported from a program every 5 minutes. I have another program that imports that data every 8 minutes or so. There is one field in the export file that appears in Column 1/Row 3 that I need to have in Row 2 so that the program that imports the .csv information can see it. With it being on it's own row in row 3, the importing program cannot be configured using the import GUI to access and process that piece of information.

I just taught myself how to write a .bat file to move, copy, rename files from one folder to another. My goal is to have program 1 export the files into one folder. Have an automated task set up to run the .bat file to move the data field on any files in the that folder to Row 2 and then move the folders to a seperate folder to be processed.

Is this possible? There are currently 64 columns in row2, so I would need this to go into a new column, column 65. The first row is header information.


See More: Move data field in .csv file

Report •


#1
November 4, 2011 at 02:04:27
You posted "My goal is to have program 1 export the files into one folder. Have an automated task set up to run the .bat file to move the data field on any files in the that folder to Row 2 and then move the folders to a seperate folder to be processed."

Move which folders? Do you mean move the files to a separate folder?

Do you need to add a header for the additional column 65?

Is there a line 4, 5 etc in the input files?

Please post a sample of the first 3 to 4 lines in the .csv files so that we can identify any characters which might have special meaning in the Command Shell (such as < > & etc).


Please come back & tell us if your problem is resolved.


Report •

#2
November 16, 2011 at 20:27:59
Sorry -- was busy with other project and now getting back to this. Basically the file has three rows of data. After some further thought, I need a way to remove the end of line characters in row 2 so that the fields in row 3 appear in r2.

With ^ representing a tab,

Currently Getting:
File Hdr
22345^82322^Prefix^StreetName^Suffix^City^State^Zip^BldgName^Lat^Long
XYZQ

Need it to read:
File Hdr
22345^82322^Prefix^StreetName^Suffix^City^State^Zip^BldgName^Lat^Long^XYZQ


Report •

#3
November 17, 2011 at 01:52:52
Please answer the questions in my first post (#1)


Please come back & tell us if your problem is resolved.


Report •
Related Solutions


Ask Question