2

集約したい数千の小さなCSVファイルがあります(最初にスクリプト内で少し変更します)。それらはNASデバイス、より正確には「SNAP」サーバー上にあります。私は Excel から VBA を使用してある程度の成功を収めました。1 か月前のことを思い出せば、約 700 個のファイルを約 1 分で処理しました。実際には、半分成功でした。スナップ サーバーには、80% の PDF といくつかの独自形式のファイルがあり、CSV は 20% しかありません。ファイルタイプをテストするループの実行時間は 2 時間以上かかり、スクリプトは入力した日付フィルタリングを完全に無視したようです。迅速な結果または「成功」は、作成して C ドライブに置いた CSV の 700 コピーでした。私はほぼ 20 年間 VBA スクリプトを作成してきました。過去 9 年間、VBA からの CSV の読み取りと書き込みを数多く行っています。

スナップ サーバーを、VBA を使用するドライブ/フォルダーのように扱うことはできませんか?
VBScript の方が適切でしょうか? (結局のところ、すでに FileSystemObject を使用しています)
VBS を使用できる場合、NAS にスクリプトを保存し、タスクスケジューラを使用して実行できますか? スナップ サーバーの経験がある方からのヒントやヒントをいただければ幸いです。

4

1 に答える 1

1

Some thoughts on the choice of language:

VB Script is more lightweight than VBA in that it does not require MS Office to be installed. The syntax is similar so there is no real productivity difference.

Moving forward Powershell would be strongly recommended for Windows system admin tasks, general text file processing, etc.

Some thoughts on using the NAS server:

a) If running your script on a workstation you should be able to use a URI string \\myserver\myshare to connect to a share on the NAS. If not you may need to map a drive letter to that share before your script runs.

b) If you want to run your script on the NAS there are 2 things to consider: is the NAS OS locked so that you may not add your own scheduled task and is it Linux or some flavor of Windows. Many NAS products use embedded Linux so running a VBA or VBScript solution directly on the NAS may not work unless it is based on something like Embedded XP and you have access to Scheduled Tasks, etc.

Hope this helps...

于 2009-11-04T16:26:20.667 に答える