Jump to content

e.cmd error with spaces in the username


Black_chameleon

Recommended Posts

I just ran the USB Exfiltration script on a Windows 10 Home machine.

The username is "Mom and Dad".

e.cmd seems to fail in this situation.

if Exist %USERPROFILE%\Documents evaluates to TRUE, but the xcopy command fails because of the space (I think).

When running with: "xcopy /C /Q /G /Y /S %USERPROFILE%\Documents\*.pdf %dst% >>nul"  the script makes the folder, but does not copy any files.

However, this command gets each file: "xcopy /C /Q /G /Y /S "%USERPROFILE%"\Documents\*.pdf %dst% >>nul"

If there is a better way to handle this, let me know.  If I have missed something, please let me know!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...