csharp Posted October 3, 2011 Report Share Posted October 3, 2011 I have a macro that is copying files from a single location to multiple destinations that is working just fine. First it checks to see if the file exists, and skips it if it doesn't. If the file does exist, it will be copied to it's appropriate folder and then the original copy is moved to a "done" folder. What I need your help with...if it finds the file and moves it, I would like it to delete the entire row from the csv file so that when we run the macro again, we won't have so many rows to go through. There are only two columns in the csv file, but there are over 6,000,000 rows, which is why we would like to eliminate as we go so there aren't so that this process will get faster the more times we run it. <ADFBEG:F10:001:000001:000000:C:\EVrestore\homestore1\home1store1.csv><IFOTH:01:2:M:\recovery\dvs_2\%T1%><DOFILE:05:YY:M:\recovery\dvs_2\%T1%>%T2%%T1%><DOFILE:07:YY:M:\recovery\dvs\%T1%>M:\recovery\dvs_2\done\%T1%><ELSE><ENDIF><ADFEND> Quote Link to comment Share on other sites More sharing options...
james123 Posted November 8, 2011 Report Share Posted November 8, 2011 I have a macro that is copying files from a single location to multiple destinations that is working just fine. First it checks to see if the file exists, and skips it if it doesn't. If the file does exist, it will be copied to it's appropriate folder and then the original copy is moved to a "done" folder. What I need your help with...if it finds the file and moves it, I would like it to delete the entire row from the csv file so that when we run the macro again, we won't have so many rows to go through. There are only two columns in the csv file, but there are over 6,000,000 rows, which is why we would like to eliminate as we go so there aren't so that this process will get faster the more times we run it. <ADFBEG:F10:001:000001:000000:C:\EVrestore\homestore1\home1store1.csv><IFOTH:01:2:M:\recovery\dvs_2\%T1%><DOFILE:05:YY:M:\recovery\dvs_2\%T1%>%T2%%T1%><DOFILE:07:YY:M:\recovery\dvs\%T1%>M:\recovery\dvs_2\done\%T1%><ELSE><ENDIF><ADFEND> Sorry but not clear to me... I understand you want to reduce size of file but what exactly do you want to del in your csv file ? To delete some lines, just use TEXT FILE PROCESS .... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.