is there a way to copy a file to every folder at once? i'm pasting a folder customization app...
Copying a file to every folder at once
if you're on XP you'll need to script this using WSH. Based on some of your other requests & your apparent keenness I think you'll be amazed what can be accomplished once you learn to use it.
Or look for an app call Shell Drag and Drop Robot.
Edit: Check out this link http://groups.google.ca/group/microsoft.pu...b379d256e00b634
oh ok..nvm way to complicated.
Not Complex. Fairly straight forward.
c:temp = Base Folder to Start With. For example for every file in Program Files then change to
c:Program Files
c:test.txt = file. Change to the file you want.
Set fso = CreateObject("Scripting.FileSystemObject")
set root=fso.getFolder("c:temp")
fname="c:test.txt"
call folderlist(root)
sub folderlist(grp)
target=grp.path & ""
fso.copyFile fname,target,true
for each fldr in grp.subFolders
set nf=fso.GetFolder(fldr.path)
call folderlist(nf)
set nf=nothing
next
end sub
and, in case you don't know: save that code as a vbs file (example: copy.vbs). it is then runnable using xp's built-in WSH (windows scripting host) by double-clicking it. it really is pretty straightforward.
forgot the big one. thanks shmengie.
In case you/someone messes up here's a delete script. Notice the additional line & the change from copyfile to deletefile.
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
set root=fso.getFolder("C:GRAPHICSICONS")
fname="c:test.zzz"
fnameb="test.zzz"
call folderlist(root)
sub folderlist(grp)
target=grp.path & ""
fso.DeleteFile(target & fnameb)
for each fldr in grp.subFolders
set nf=fso.GetFolder(fldr.path)
call folderlist(nf)
set nf=nothing
next
end sub
my norton anti virus comes up saying that it's a high risk malicious code. it says my comp is halted. what does that mean?
of course it's high-risk. it's executable code and norton doesn't know what it is or where it came from. but, you do! let 'er rip!!
Umm... Norton, you have my apologies. ![]()
Just don't replace fnameb="test.zzz" with fnameb="*.*" or you will delete all your files.
Edit: If you're theming the folder background(s), etc. There's an app out there to do that.
Aqua-Soft Forums