Leigh Posted September 6, 2004 Report Share Posted September 6, 2004 We have test and live intranet servers both of which I have file access to via UNC paths. Normally I make changes to the files on the test server and then I have to copy the files to the live server. The biggest issue is that I can only copy the folder I am currently working on and not the entire intranet as other people may be making changes to other folders at the same time. The folder I need to change is not always the same so I can't hard code the paths either. My first attempt to solve this using a macro involved copying the name of the folder I am working on to the clipboard and then running a macro to save the clipboard text to a file, and then read the file into a variable, and then run the Copy command with the source from our test intranet as \\Ephraim\IT\Programming\Web\Web Site Folders\pccnet.pcci.edu older\pccnet.pcci.edu\%T1%\*.* and the destination on our live intranet as \\Gideon\Intranet\PCCNet\%T1%\ While this appeared to work in my testing it has the dangerous potential to copy the entire intranet if something is not copied to the clipboard. My current idea is to write a new macro that will open a command prompt and then paste the appropriate copy command text and then allow me to either run it or cancel. This however doesn't seem ideal. What I would like is for the macro to get the file path from my currently open exporer window (which I know it can do) and then create a new text variable replacing the test path with the destination path. With this variable created the copy command could be run with these variables and the entire option would be not only reliable but also transparent to the user. If anyone knows how I could make this work, or another possible method please let me know. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.