Protected Folders Batch File Backup

goomba619

New member
Local time
7:13 PM
Messages
18
So I am trying to create a batch file that will copy certain folders from the My Documents and Program Files 86 folders. Of course these are protected. I can make a batch file and use robocopy to copy other files just fine. How can I set admin privileges? Or whatever it is I need to do to make it work? I am using group policy editor to run the bat file on shutdown.

Example:

Robocopy C:\Folder\ D:\Folder\

that works fine...but when I try copying files out of Program Files x86 or My Documents the batch fails
 

My Computer

OS
W7x64
But why fails? What error message is thrown?
First of all, try to run the bat manually by double clicking, and see if it works there. Then you can try to automate, but it's easier to go one step at a time.

About permissions, Program Files has read access for every user, and My Documents has read-write for you and nothing for others. So running manually you should be able to do it, provided you have write permissions on the target folder.

Maybe it's a problem caused by running at shutdown. Check under what user context is running the bat in that condition.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
I have been trying it by running manually. If I add a "pause" to the end of the command It shows error: Invalid Parameter #3 J:\Test\test




This is the command I have been using which works on any other folders besides protected ones....


robocopy C:\Program Files(x86)\HTC J:\Test\test
Pause
 

My Computer

OS
W7x64
I see a problem!
When you refer in command line to paths with spaces, you must enclose it in double quotes, otherwise it interprets it wrong.

The command should be:
robocopy "C:\Program Files(x86)\HTC" J:\Test\test
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Thanks, thats progress. But it now says that it "skipped" the folder. Nothing is copied...
 

My Computer

OS
W7x64
Some internet digging brought up this

"Protected files happen when you copy content through a share or download it through Internet explorer.
The OS adds a zone identifier to the file. Users can still access the file, but copying them through command line tools is no longer possible. I have no idea what the use of this great feature is. But I'm looking for a sollution to it"


Sounds like this is happening to me. It seems that I cannot simply make a batch file to copy anything out of protected folders
 

My Computer

OS
W7x64
Makes no sense at all skipping all those files for the simple fact that they were downloaded with IE. Seems like a bug with robocopy to me. Can you try the normal copy or xcopy instead?
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518

My Computer

OS
W7x64
Copy says file not found, Xcopy says 0 files copied. Seems like I need to somehow "log" in to get the access to those files
 

My Computer

OS
W7x64
To be clear, I am already logged in as the same user that I am trying to make the batch file for, not another user
 

My Computer

OS
W7x64
Back
Top