Home AMX User Forum NetLinx Studio

Directory Path Hell - (NS content)

[rant]
So, we had to change out a disc on the File Server to get more storage. Thus begins my long trip through the seventh circle of NS hell...

It seems that duet doesn't do like most other SDKs and make the project folder the 'root' pathway but use the real pathway all the way out to the drive name (and thus shared computer involved) So, all the duet modules that I foolishly chose to use now no longer can compile.

After talking to TS I must go through and 'Pack-N-Go' all my projects with duet modules and rebuild the directories. Of course, Pack-N-Go occasionally fails to keep my folder hierarchy within the project folder in tack and just decides to put all the files (ALL THE FILES) flat in the new directory. Naturally, you don't find this failure out until you try to unpack the Pack-N-Go.

ARGGGGGG!!!!

[/rant]

Comments

  • Jorde_VJorde_V Posts: 393
    ericmedley wrote: »
    [rant]
    So, we had to change out a disc on the File Server to get more storage. Thus begins my long trip through the seventh circle of NS hell...

    It seems that duet doesn't do like most other SDKs and make the project folder the 'root' pathway but use the real pathway all the way out to the drive name (and thus shared computer involved) So, all the duet modules that I foolishly chose to use now no longer can compile.

    After talking to TS I must go through and 'Pack-N-Go' all my projects with duet modules and rebuild the directories. Of course, Pack-N-Go occasionally fails to keep my folder hierarchy within the project folder in tack and just decides to put all the files (ALL THE FILES) flat in the new directory. Naturally, you don't find this failure out until you try to unpack the Pack-N-Go.

    ARGGGGGG!!!!

    [/rant]

    Hey welcome to the wondrous joys of being an AMX Programmer. At least you didn't get the *Hmmmm... Sounds difficult* thought, resulting in the 'not possible' statement.

    Regardless I've had this too, I now store everything locally and back it up to the server, or if you're really forced to have your computer's files shared on your network you could consider placing it in the actual path on your pc instead of putting it on a relative path. That will save you a lot of hassle and headaches.

    It's not pretty.. but hey what else is new.

    Edit: I forgot to mention that you have my sympathy.
  • AuserAuser Posts: 506
    ericmedley wrote: »
    After talking to TS I must go through and 'Pack-N-Go' all my projects with duet modules and rebuild the directories.

    Nooo, don't do it!

    Just edit the workspace file in a text editor (it's just XML) and replace any definite paths with relative paths.

    You can just do a search and replace for
    [drive]:\[path to project folder]\
    
    with an empty string. If something's in a folder above the project folder then use
    ..\[folder name]\[file name]
    

    Two folders up:
    ..\..\[folder name]\[file name]
    

    A file in a child folder:
    [folder name]\[file name]
    
  • viningvining Posts: 4,368
    Interesting, I never would have thought to right click a .apw file and open in an editor. I used NotePad++ which is free from sourceforge, handles high-lighting & formatting of muitliple languages, file compare, find & replace ...... etc, etc, etc.

    This might come in handy someday and would probably makes e's day if it isn't too late already.
  • jjamesjjames Posts: 2,908
    APW = XML = great way to create your own batch back-up utility of all your workspaces. ;-) Something I wish AMX would come out with, but . . . sometimes you gotta do the work yourself - lol
  • ericmedleyericmedley Posts: 4,177
    Auser wrote: »
    Nooo, don't do it!

    Just edit the workspace file in a text editor (it's just XML) and replace any definite paths with relative paths.

    You can just do a search and replace for
    [drive]:\[path to project folder]\
    
    with an empty string. If something's in a folder above the project folder then use
    ..\[folder name]\[file name]
    

    Two folders up:
    ..\..\[folder name]\[file name]
    

    A file in a child folder:
    [folder name]\[file name]
    

    Thanks!
    I ended up doing this. I just went in and did it on all my projects It still took some time. But, oh well. It's just time....
  • AuserAuser Posts: 506
    Glad I could help :)
  • ericmedleyericmedley Posts: 4,177
    Auser wrote: »
    Glad I could help :)
    In my case it was just one instance being bad and that was just the omission of a '\' on the main.axs file path.

    I'm still a little baffled in that I do on occasion have to copy my files to my laptop desktop and that doesn't seem to break anything. But, copying to a new server and drive did.

    All the rest of the paths were not hard coded. Also, this only causes a problem when a DUET module is present in the project. Any non-duet projects work just fine. I chalked it up to some paths in DUET.

    Either way, it seems to be fixed for now. (as 'for now' echos menacingly)
  • viningvining Posts: 4,368
    Auser wrote: »
    Nooo, don't do it!

    Just edit the workspace file in a text editor (it's just XML) and replace any definite paths with relative paths.
    This is a good tip to remember anytime you want to change your directory's layout or modify the directories of jobs taken over so they fit your style.

    Just had a need to do this and changing the workspace's files directory paths using find/replace is a heck of alot easier than changing each file's path in properties. I used XML Pad to open the .apw but any editor would probably work such as NotePad++.

    XMLPad also creates a back up of the original when saving after changes have been made which is kind of cool.
Sign In or Register to comment.