Moving subproject files and updating links in master project - vba

I am working in MS Project and frequently move schedules from a share drive to my computer, manipulate and run macros on them, then copy them back up to the share drive.
Generally if I copy all of the subprojects with the Master project at one time the links to the subprojects will update to the destination folder (the one on my computer.) Occasionally I do this and the links do not update, so the Master Schedule is still pointing to the files on the share drive. This causes problems with the macro I then run on it. I have not been able to find anything in forums about this problem.
Has anyone come across this problem? Is there a setting somewhere that is getting changed? Any help would be appreciated.

Yes, I've come across this problem.
The most reliable way of copying a master schedule and all it's sub projects without creating the duplicate links is to:
Select all the files on the share drive
Right click and send them to a zip file
Move this zip file to your local drive
Right click on the zip file and extract all
Then do the same in reverse once you've run your macros. This should reliably copy the master/sub project files with the correct links, without creating the erroneous links you've seen.

Related

Find and Replace to fix broken links

I am new to VBA and learning a ton using these forums but I am stumped on how I should tackle this problem I am coming across.
The Problem:
I am setting up VBA for our workplace physical inventory that we do 1 time per quarter. I have so far got my code to create a new folder based on today's date, and then the code will copy and paste all the files and subfolders from the master folder into this newly created folder. The issue I am having is that the excel file we use for our physical inventory, is linked to various other excel workbooks (which can be found in the sub folders under the master folder), so when the code copies and pastes the files, the file paths change and break the links to the various workbooks. Ideally, I am just trying to get my code to find and replace the existing "master template" folder path, to the newly created folder path as mentioned above. That way, all that needs to be done is to click the button that creates the new physical inventory folder with the master templates, then it will find and replace all existing external paths, with the new folder path to enable the links to continue working. If one of you master excel wizards would be so kind to help a rookie out, I would greatly appreciate it. I am not at work now, but I can provide the VBA code I have created thus far tomorrow. I am also always open to new ideas as to how I can do this in a simpler manner if find and replace isn't necessary. I have tried to do fix links command and that doesn't work without having to go through each workbook and manually changing path locations.
Thank you once again for all your help.
if code is not needed, there is a free tool that I came across which removed all broken links in the Excel workbook:
https://youtu.be/FyCNWE3_YpY

Is there an easy way to move a file to a different folder in dbt Cloud?

Is there an easy way to move a file to a different folder in dbt Cloud, without having to create a new file of the same name in the new folder, copy/paste from the old file, and delete the old file, which is a pain.
Is there a good reason I should NOT do this? I assume my refs still work as long as the filename remains the same, and I don't have any specific folder logic tied to this file.
For example, say I have my_model.sql in my 'staging' folder and I want to simply move it to my 'mart' folder instead. In this example I'd like to do this to reflect that my file is really a more 'stable' mart-type table file vs a staging view. I realize I can just change the materialization type, but I'm doing this more to organize things clearly. Thanks!
The way to move a file in the cloud IDE for dbt is not 100% obvious. You can use the rename function to move a file to another location.
Click on the drop down next to the file name, then select "Rename." That will open a file path and you can change where the file lives from there by typing in the new folder's name.
The easiest way I have found to do this is...not using DBT Cloud, but using github desktop (no command line needed).
Create a new branch
Open repository in github
View files in your file explorer
Move files or directory locally
Upload to github
Push to origin for the branch you created
Open a pull request
Merge
Depending on what the file or directory is you may find the creating a new branch and opening PR to be overkill. For my specific project there is a lot of legacy organization and models that we aren't totally sure don't have downstream dependencies, so creating a new branch for this allowed me to test run all of our models.
Hope this helps!

Copy of Java Project fails due to IntelliJ Inspection Profiles

Context: I am trying to copy my Java Project from one drive to another.
Issue: The copy stops, as it is unable to copy the Project_Default.xml file from .idea-> inspectionProfiles to destination. Only if I skip this, will I be able to copy the project. The file highlighted in the attached screenshot causes this issue.
Research: I referred to a couple of threads in this forum, but was unable to figure out. Link1 Link2
Query:
I was able to manually copy that file to destination drive, but when I try to copy the whole project it fails at this file. Any reason why this happens?
Any inputs on what maybe causing this issue, will help me.

How to make files accessible to all users on Visual Basic app

I am attempting to make an instructional app for the call canter that I work at. Part of the code allows users to display information through the use of several files in our directory with drop down combo boxes.
For instance, a small portion of the code is similar to this (I did not save the app and bring it home so I am going off memory):
If cboGlossaryTerm.SelectedItem("MSN")Then
Process.Start("S:\MSN.pdf")
End If
I put the pdf files in My Resources and the Word files are added under the Solution folder.
I am using filepaths in the code as well.
(I attempted to save the pdf files in the Solutions folder but the pdf was not compatible.
With me adding the files this way, will users who do not have access to the S drive folder be able to display the files? Also, will the files remain accessible in the program if they are deleted from the S drive? If not, how should I be referencing the files in my project? Do I have to reference the pdf files from My Resources? If so, how do I do that in an If-Then statement similar to the one above?
from what you have there it doesn't look like the pdfs in the S:\ would be available to anyone who doesn't have the drive mapped on their local machine.
as for if the files are deleted, if they are being loaded from the S:\ then when they are deleted from there the program will not be able to find them to load them.
if the program is being installed on the local machines you might want to look at just including the pdfs in the installer and accessing them through the program files path.

Monitoring a folder for a specific file

I have a program that uploads .txt or .rje files from a folder. Now when you put any other file format into the folder, like .jar, then the application crashes.
Now I cannot change the mechanics of the application, so I would like to know if there is a type of program/script that I can use that monitors the folder for any files that are non-txt/rje and then move them out of the folder once they are put there...
Is this possible using a script? (I do not want to use a .exe application to do this...not allowed to install 3rd party software onto the server this folder exists...)
Thank you
Your solution won't work as you have a race condition between the program doing the upload and the one doing the deletion. If upload runs first it still crashes.
The correct solution is to modify the upload program to cope with this scenario.
If that is not possible then the only safe work around would be to use a new folder to drop the files in, have a script run that constantly scans the folder and if a new file appears either move it to the processing folder or deletes it as appropriate.
(For the actual detection that's not my area of expertise but the simplest would be to have a bat file that just runs periodically (or even just runs once and loops with a wait, check, move, wait, check, move, etc) and processes everything in the folder when it runs).