Wednesday 18 November 2015

Design Data Access Speed

For all my life I have been using Design Data folder on a network server as a mapped network drive. It was only recently that we got audit from Autodesk on one of our large projects and they told us that Design Data needs to be locally and that’s a “must” not a “should”.

All fine  and clear but how do you make sure that your local files are in sync with the network ones especially when dealing with multiple users so that the files are consistent on all workstations.

While you could browse the net a find a dozen free apps that can do that for you, installing and migrating apps it’s time consuming not to mention that installing to many utilities can slow down your computer to a halt.

The solution is to use a “bat” file pinned in the Startup folder.

*.bat files invented by Batman?

What is a BAT file?
A batch file (BAT) is a text file containing a sequence of commands and it’s called batch because it is used to feed the commands to the operating system in bundles rather than needing the user to type one at a time.

In our case we will be using a single command with various arguments to speed up the process, copying the whole folder structure overwriting all but getting newer files only.

Let’s see how to run those commands and how to get help choosing the correct arguments to parse over in the bat file.

On the Start menu choose start and type cmd (you can press WIN+R). We are going to use “xcopy” instead of the plain “copy” command because it will get the full structure of files and folders.


Tip: to see the arguments the command takes type your command and then add “/?” at the end like this "xcopy /?"

The arguments we are going to use are /s /d / y and if you type xcopy/? You will get the following description:
/S           Copies directories and subdirectories except empty ones.
/D:m-d-y     Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/Y           Suppresses prompting to confirm you want to overwrite an existing destination file.

So we are going to copy the whole structure, no empty folders, overwriting all files, but only copy newer files. The last bit will save a lot of time to an almost instant thing as we will see later.

Start Notepad, either by typing Notepad in the start menu or by using the Start/All Programs/ Accessories shortcut. Type the following:
xcopy "your source folder" "destination folder" /s/d/y  

Click on File / Save and in the Save as type choose All files (*.*). In the filename type a name followed by .bat like: “DesignDataCopy.bat” and choose a local folder to save like my documents or your desktop.


Drag the file from window explorer into Start/All Programs/Start to have it running when windows starts.

As you can see from my demo here, if the local folder doesn’t exist it will be created.


If a new file is added to the source folder when you run the bat file it will instantly be created on local destination. The /d argument makes sure only newer files are copied over speeding it all up.


Of course there’s a catch. If you modify any of the Design Data files you need to manually copy them over to the network drive so that by morning when everybody starts up the new files will be available for them.

This is one more reason to shutdown your computer in the evening and while I restart several times a day just to clear out cache and improve speed I’ve seen others that don’t restart for weeks. If so they need to manually run the bat file to get the updates.

The bat file is here to help... Why So Serious?




Later,
ADS



photo credit: Bat-man via photopin (license) photo credit: 辦公室的新夥伴-小丑先生 via photopin (license)

No comments:

Post a Comment