1 reputation
2
bio website
location
age
visits member for 2 years, 1 month
seen Jun 5 at 15:17

May
30
awarded  Popular Question
Jan
18
comment Batch script to append record to csv files
I came across a way to do this using BASH, so I downloaded cygwin on my pc and have been trying to execute from a bat all day and cant figure it out. I either cant get into the correct directory or it finds a syntax error in the 'done' line. Might you have any advice on whats wrong with my code @ echo off start c:\cygwin\bin\bash.exe -1 #!/bin/bash cd "C:/Users/research1/Desktop/Test" ls | while read csvfile do IFS=, read olddate open high low close volume < <(tac $csvfile) read newdate < <(date -d "$olddate + 1 day" +%Y%m%d) echo $newdate,$close,$close,$close,$close,$volume >> $csvfile done
Jan
18
comment Batch script to append record to csv files
Sorry I have been away from the machine I will check it out sometime today.
Jan
18
comment Batch script to append record to csv files
I am open to using another programming language, although I am still unsure of how to implement. I am most comfortable with C++ but I have never had to handle something like this
Jan
16
comment Batch script to append record to csv files
The appended date is always going to be the current date, so perhaps the best method for doing this is simply calling the cmd line for the date and appending it in the european format as opposed to incrementing the prior date.
Jan
16
awarded  Commentator
Jan
16
comment Batch script to append record to csv files
unfortunately, I dont just need to join two csv's, I am hoping to generate the appended fields within the batch itself. The dates are in the current data, however the batch would be required to calculate the 20130105 field. So from the existing fields the batch needs to add a record in which it increments the date by 1 (yet be smart enough to rollover in to the next month) then copy the last close into the new pricing fields and then just retain the volume.
Jan
16
comment Batch script to append record to csv files
This is purely in research stage, and not subject to regulatory scrutiny. No clients will ever see the results derived from this project and should this system ever go live, results will be void of the dummy data and all regulatory measures will be strictly enforced. All original data is currently perserved as well.
Jan
16
asked Batch script to append record to csv files
Nov
12
comment Batch file to replace “.” with “-”
Thanks for taking the time to address my questions, I appreciate you lending a hand to help me get this sorted out!
Nov
12
comment Batch file to replace “.” with “-”
Well thank you very much, I got it working on my machine now and everything is looking good. I appreciate your time in helping a novice out. I understand C pretty well, but shell just looks like gibberish to me.
Nov
12
comment Batch file to replace “.” with “-”
I have an application that downloads thousands of stock tickers on a daily basis and formats different class shares with a period. However I am using another application to develop a trading strategy, and it is incompatible with the periods in the file names. I can set up my data downloader to run a batch script on completion to fix the file naming error. Therefore taking sometime in the beginning to get a working script is going to save me time from having to use a GUI application on a daily basis to accomplish the task.
Nov
12
comment Batch file to replace “.” with “-”
Oh ok, I tried removing the echo in the first line and overlooked the one attached to the ren
Nov
12
comment Batch file to replace “.” with “-”
I have an application that downloads thousands of stock tickers on a daily basis and formats different class shares with a period. However I am using another application to develop a trading strategy, and it is incompatible with the periods in the file names. I can set up my data downloader to run a batch script on completion to fix the file naming error. Therefore taking sometime in the beginning to get a working script is going to save me time from having to use a GUI application on a daily basis to accomplish the task.
Nov
12
comment Batch file to replace “.” with “-”
like the code below this doesn't seem to be working, I am simply copying this into notepad and saving as a batch file, then throwing it in my parent directory. When I look at the command prompt while its running it doesnt seem to be renaming. Also the window closes after execution and I dont get an end output window
Nov
12
comment Batch file to replace “.” with “-”
lol at omergerd. But this doesn't seem to be working, I am simply copying this into notepad and saving as a batch file, then throwing it in my parent directory. When I look at command prompt while its running it doesnt seem to be renaming. Also the window closes after execution and I dont get an end output window
Nov
12
comment Batch file to replace “.” with “-”
@Karan I have "File.name.ext" that should become "File-name.ext"
Nov
9
asked Batch file to replace “.” with “-”