Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Would Not Copy A File To C:\Program Files

Featured Replies

Hi All,

I have been using WPI for a few months and feel really comfortable with it at this time. I ran into a snag recently that has me stumped.

I want to use the FILECOPY command to copy a file from the Install directory on my CD to a directory under C:\Program Files. There are no attribute restrictions in place, yet WPI won't copy the file. I know that my syntax is correct because if I just change the directory to a place other than C:\Program Files, it works fine. I was also able to use AutoIt to copy the file to the directory under C:\Program Files, so I am pretty confident that it is not a system restriction issue, but a WPI issue.

I tried looking in the manual, but could not find anything about the FILECOPY command, even though it seems self explanatory.

Any help would be greatly appreciated.

Regards,

Mike

:unsure:

  • Author

Hi Kelsenellenelvian,

I can post the command tomorrow, because I am at work now. However 1 thing forgot to mention is that I am testing this out in a virtual machine, not a real one. I didn't think that this would make a difference, but who knows.

If I remember correctly the command was FILECOPY %WPIPATH%\Install\Folder1\appname.exe C:\Program Files\Folder2. I don't remember about quotes, but like I said, the syntax has to be correct because if I change the target directory to be out of C:\Program Files, it correctly copies the file.

Regards,

Mike

:unsure:

Make sure you create the folder before you try to copy to it (i.e. MKDIR "C:\Program Files\Folder2").

  • Author

Hi Zorphnog,

Yeah the folder is already present when I try to copy the file to it.

Mike

  • Author

Hi Zorphnog,

I tried a test. I manually created an empty directory under C:\Program Files called app1. So the path to this directory is C:\Program Files\app1. I can manually copy a test file to it, and I can use AutoIt to copy a file to it. However when I use WPI to copy a file to it, it doesn't copy anything. And I know the syntax is OK because if I just remove Program Files from the path and make the target directory C:\app1, WPI will copy the file to this folder.

I hope that this clears things up.

Regards,

Mike

You really need to provide your code if you want help you with it, otherwise we cannot see what the error is. I have never used WPI, but my understanding is such that without providing double-quotes `Program Files` would only be seen as `Program`.

e.g.

cmdn[pn]=['FILECOPY %WPIPATH%\\Install\\Folder1\\appname.exe "%ProgramFiles%\\Folder2\\"']
  • Author

Hi Yzowl,

As I mentioned in a previous post, I am at work now, but I will post the command tomorrow.

Thanks for the response.

Mike

  • Author

Hi Kelsenellenelvian,

OK, the command that works is FILECOPY "%wpipath%\Install\Test\test.txt" C:\temp.

This command copies the file 'test.txt' from the install folder in wpi to the temp directory in the root of the hard drive, C:\.

Now this command FILECOPY "%wpipath%\Install\Test\test.txt" C:\Program Files\Test does not work. The destination directory is present and all system attributes are off, but the file 'test.txt' does not get copied there. No error messages or boxes are shown.

As a sanity check, I wrote an AutoIt script to do this same thing, and it works flawlessly.

Is there a command line switch for the FILECOPY command?

Thanks for any replies.

Regards,

Mike

Now this command FILECOPY "%wpipath%\Install\Test\test.txt" C:\Program Files\Test does not work...

You have to use quotations any time a path has spaces in it. Try... FILECOPY "%wpipath%\Install\Test\test.txt" "C:\Program Files\Test"

  • Author

Hi zorphnog,

OK I will try that tonite, and report back tomorrow.

Regards,

Mike

  • Author

Hi zorphnog,

You nailed it right on the head! The path 'C:\Program Files' has a space in it and it needs double quotes to work, while the path 'C:\temp' has no spaces and hence no double quotes. As Carlos Mencia would undoubtedly say "DEE DEE DEE"

Thanks for all the help, and keeping this forum a 10.

Regards,

Mike

Hi zorphnog,

You nailed it right on the head! The path 'C:\Program Files' has a space in it and it needs double quotes to work

I'm glad to see you give credit where it's due!
Maybe you are just missing a " or something tiny like that.
without providing double-quotes `Program Files` would only be seen as `Program`.
  • Author

Hi All,

Once again us apprentices learn another lesson from the masters!

Mike

:thumbup

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.