Batch file

Status
Not open for further replies.

trithumb

Posts: 55   +0
alright im tryin to pull a prank on a classmate... i want to create a batch file to repeatedly copy a file or a folder to his desktop....

start/min
cd \
cd c:\documents and settings\all users\desktop
:loop
md folder
goto loop

but once the folder has been created it wont make multiple i want it 2 fill his screen... my teacher assigned me this task n ive been fighting with it for 3 days now.... ne help would b awesome
 
start /min
CD %allusersprofile%\Desktop-------------(actually not sure if you will see this, better to use %userprofile%)
md loop
:loop
cd loop
md loop
goto loop


I haven't tested it! (but it loops, I mean looks good)
 
Or you could just

copy %userprofile%\locals~1\tempor~1 %userprofile%\desktop

Which copies all files from Temporary Internet Files to Desktop (in Xp)
If you go to Start Run and type in shell:Cache (on any Windows) you'll see how much junk is in there.

Anyway users should clean their Internet cache!
 
Doh, forgot *.*

copy %userprofile%\locals~1\tempor~1\*.* %userprofile%\desktop

Note there's a space after *.* (actually just copy and paste the line)

Can you let me know if it works, because I still haven't tried it myself
If you do try it on your own system (that DOES NOT have any other files on your own desktop)
When finished, just click on Start --> Run-->Desktop
And delete all the stuff

Also this command presumes you have some Temporary Internet Files (most users have thousands)
 
ok i made this

start/min
cd C:\Documents and Settings\trithumb\Cookies
:loop
copy *.txt c:\documents and settings\trithumb\desktop
goto loop

but for sum reason wen i type it through the promt i get a syntax error in the copy line i wana do a wildcard copy of all the cookies n throw them on his desktop

and by the way the script u wrote had an error as well
 
It's because its a windows system (hidden) directory. Incredible temp won't work!

Just use another folder, ie %windir%
Also you are better off using the percentages to make it clean, ie:-

Copy %windir%\*.* %userprofile%\Desktop
 
As per PM, I am replying again.

call C:\MyFolder\CHOICE /T:N,3

Note: The "MyFolder" refers to where-ever you have "choice" and your bat file

Change the number 3 to whatever number you want (each number is a second ie 3= 3Secs)
 
Status
Not open for further replies.
Back