Bat to exe converter will not download on my Windows 7. It says the zip file is invalid.
I have the same problem with XCOPY described in this thread.
I have used XCOPY in similar .BAT files on all my PCs from DOS through every Windows to Vista. It refuses to work on 7.
The code in the .BAT file is as follows :-
echo on
xcopy "C:\Users\David\My Documents\*.*" "DAVID_BACKUPS\CHANGES_Documents" /s /m
echo off
echo on
xcopy "C:\Users\David\My Pictures\*.*" "DAVID_BACKUPS\CHANGES_Pictures" /s /m
echo off
echo on
xcopy "C:\Users\David\My Music\*.*" "DAVID_BACKUPS\CHANGES_Music" /s /m
echo off
echo on...
I have a little strange problem under Windows 7 x64 using the copy command at the command prompt.
If I enter the following command at an elevated command prompt:
copy somefile c:\
it copies the file somefile to c:\. Now when I create a batch file from this command and run it with admin privileges it says it cannot find the file! Also, a strange thing is that when I run the batch file without administrator privileges it properly says 'access denied', so it can find it then, which is correct because you can't just write something to the C root.
Can someone verify and possibly resolve this?
Note this is all with UAC set to standard.
Bat to exe converter will not download on my Windows 7. It says the zip file is invalid.
I have the same problem with XCOPY described in this thread.
I have used XCOPY in similar .BAT files on all my PCs from DOS through every Windows to Vista. It refuses to work on 7.
The code in the .BAT file is as follows :-
echo on
xcopy "C:\Users\David\My Documents\*.*" "DAVID_BACKUPS\CHANGES_Documents" /s /m
echo off
echo on
xcopy "C:\Users\David\My Pictures\*.*" "DAVID_BACKUPS\CHANGES_Pictures" /s /m
echo off
echo on
xcopy "C:\Users\David\My Music\*.*" "DAVID_BACKUPS\CHANGES_Music" /s /m
echo off
echo on
xcopy "C:\Users\David\Contacts\*.*" "DAVID_BACKUPS\CONTACTS" /s /m
echo off
pause
The way I and my family use it, on all our PCs, is as follows :-
Plug in the backup device (nowadays a USB external drive but in the past it has been a series of 3.5 inch disks)
Open the device and click on .BAT file BACKUP_ALL.BAT
It should then copy all the files that have changed since the last time the .BAT file was run onto the necesary folders in "DAVIDS_BACKUPS" on the current drive - that is those with their ARCHIVE attributes set on. But it only works with "Contacts", with all the other XCOPIES is says :-
File not found - *.*
0 File(s) copied
even though all the ARCHIVE attributes on all the files are most certainly set ON.
I need this to work every time for all my users. It is unreasonable to have to go to heightened Administrator levels. My users are essentially naive.
All further help most gratefully received
".... the reason ONLY the Contacts files are copied is because it's the only correct path."
"..... the REAL folder name is just Pictures, Documents and Music so... your xcopy path is INCORRECT for them."
Many thanks for this advice, and information. What an utter embuggerance that M&oft have reintroduced this annoying, and IMHO rather silly, "My ..." business. Your hint solved the problem immediately.
"Your example would never backup to a usb drive because you have no target drive letter. It will only create the folders and copy to your C:\ drive"
It does work because the .BAT file is run FROM the USB drive. The whole point is that my naive user population just need to plug in the USB drive and click on the BACKUP batch file. By default it copies to the current drive.
"I would use /d rather than /m it's more reliable than fliping the archive attribute."
But this would defeat the object. I am only backing up those things that have changed since the last backup. The whole "Pictures", "Documents" and "Music" folders are copied wholesale every now and then to the same drive, a process that can take quite literally hours because I'm a notorious hoarder. It wouldn't be at all friendly to do this every day. But backing up just the daily changes is a matter of seconds, or minutes at the most.
This backup method saved my bacon when my laptop died on me last week. I copied the full folder backups to the new laptop, then the things that had changed since those full folder backups were done, and reviewed those places where I had changed folder and file names and moved them around, or deleted them, and I am working again. The only problems have been the oddities of Windows 7, which I have overcome with your excellent advice, and reloading previously downloaded software. I've lost 18 months of emails, but I still hold out hopes for recovering them.
Many, many thanks again, and consider your gold star well earned.
W7 protection i think. this crappy OS takes away more then it gives i think.
Even if u are administrator, u still cannot fully use anything u want in anyway u need.
As my example shows u cant copy files anywhere u want using CMD, what the hell is up with that ?
What kind of administrator do i have to be to be able to do what administrator should be able to do (everything)
I coded a program and had another execution issue, looks like windows 7 doenst transfer permissions to files correctly if this file was executed using shortcuts that were executed by another application.
For example u have a shotrcut leading to program that executes another program. u execute this shortcut using yet another program and u have a problem, the final destination is not executed somenow, yet all program functions worked. To fix it i had to go back to Windows XP and i love it
TO be hones man if u realy need something to bo copied to where u want it, use that bat to exe converter i gave u link to and compile using 1 simple option (add administrator manifest). This will solve ton of problems. In fact it works so great that it even lets o owerwrite system files such as dll's ad any other. To bad W7 wont let u do it unless u are some kind of super duper administrator or something.
In fact it would solve my problem but my script is to complex to run in CMD, so i had to code it in language.
Good luck
CMD rocks
I have a little strange problem under Windows 7 x64 using the copy command at the command prompt.
If I enter the following command at an elevated command prompt:
copy somefile c:\
it copies the file somefile to c:\. Now when I create a batch file from this command and run it with admin privileges it says it cannot find the file! Also, a strange thing is that when I run the batch file without administrator privileges it properly says 'access denied', so it can find it then, which is correct because you can't just write something to the C root.
Can someone verify and possibly resolve this?
Note this is all with UAC set to standard.
This will change the current directory to the location of the .bat file.@setlocal enableextensions
@cd /d "%~dp0"
Link Removed due to 404 Error