Check Attachments: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
Created page with "<ol> <li> Open the Command window and navigate to ''C:\IMSMAng\server\attachments''. 600px|center <li> List the file names with the command ''dir /b..."
 
No edit summary
Line 1: Line 1:
In this example there are '''4765''' rows in the ''attachment'' table and there are '''8660''' files in the ''C:\IMSMAng\server\attachments'' folder.
<ol>
<ol>
<li> Open the Command window and navigate to ''C:\IMSMAng\server\attachments''.
<li> Open the Command window and navigate to ''C:\IMSMAng\server\attachments'' folder.
[[Image:DOS cmd list.png|600px|center]]
[[Image:DOS cmd list.png|600px|center]]
<li> List the file names with the command ''dir /b > myfile.txt''
<li> List the file names with the command ''dir /b > myfile.txt''
<li> Use Navicat and import the file ''myfile.txt'' to table ''test''
<li> Use Navicat and import the file ''myfile.txt'' to table ''test''
Make sure the output file are not included in the table test i.e. myfile.txt
:If needed delete the row with ''myfile.txt'' from the table ''test''.  
<li>
<li> Add field ''guid'' to table test (varchar 38).
[[Image:Check attachment1.png|700px|center]]
<li> Now the field ''guid'' table ''test'' should be populated. The value is part of the file name and therefore the UPDATE query has to be run for each case.
</ol>
</ol>
[[Category:NoPublic]]
[[Category:NoPublic]]
{{NavBox Hub}}
{{NavBox Hub}}

Revision as of 12:18, 9 November 2016

In this example there are 4765 rows in the attachment table and there are 8660 files in the C:\IMSMAng\server\attachments folder.

  1. Open the Command window and navigate to C:\IMSMAng\server\attachments folder.
  2. List the file names with the command dir /b > myfile.txt
  3. Use Navicat and import the file myfile.txt to table test
    If needed delete the row with myfile.txt from the table test.
  4. Add field guid to table test (varchar 38).
  5. Now the field guid table test should be populated. The value is part of the file name and therefore the UPDATE query has to be run for each case.

Template:NavBox Hub