also @ TechSpot: Tech Tip: Turn Off your Display Using a Windows Shortcut and More
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Login to participate.

Go Back   TechSpot OpenBoards > Operating Systems & Software > Software & Utilities in General

Batch file

Closed Thread
Bookmark Thread Tools
  #1  
Old 02-28-2008
TechSpot Member
 
Member since: Sep 2007, 62 posts
Batch file

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
  #2  
Old 02-28-2008
kimsland's Avatar
TS Special Forces
 
Location: Australia
Member since: Dec 2007, 17,014 posts
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)

Last edited by kimsland; 02-28-2008 at 06:17 PM..
To remove this ad, sign in. To register for a new account, click here.
  
  #3  
Old 02-28-2008
TechSpot Member
 
Member since: Sep 2007, 62 posts
that worked but it just kept making sub folders... i want like 50 folders or files all over his desk
  #4  
Old 02-28-2008
kimsland's Avatar
TS Special Forces
 
Location: Australia
Member since: Dec 2007, 17,014 posts
Oh!
. ..
  #5  
Old 02-28-2008
TechSpot Member
 
Member since: Sep 2007, 62 posts
if u have aim IM me my sn is trithumb
  #6  
Old 02-29-2008
kimsland's Avatar
TS Special Forces
 
Location: Australia
Member since: Dec 2007, 17,014 posts
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!
  #7  
Old 02-29-2008
TechSpot Member
 
Member since: Sep 2007, 62 posts
says cant not find specified file
  #8  
Old 02-29-2008
kimsland's Avatar
TS Special Forces
 
Location: Australia
Member since: Dec 2007, 17,014 posts
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)
  #9  
Old 03-01-2008
TechSpot Member
 
Member since: Sep 2007, 62 posts
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
To remove this ad, sign in. To register for a new account, click here.
  
  #10  
Old 03-02-2008
kimsland's Avatar
TS Special Forces
 
Location: Australia
Member since: Dec 2007, 17,014 posts
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
  #11  
Old 03-02-2008
kimsland's Avatar
TS Special Forces
 
Location: Australia
Member since: Dec 2007, 17,014 posts
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)
Attached Files
File Type: zip UnzipMe.zip (3.4 KB, 1 views)
Closed Thread

Tip: Download Advanced SystemCare 3 Freeware - 1 Click A Day to Clean, Repair, Protect & Optimize your PC.

Thread Tools


Similar Topics
Topic Category Replies Last Post
Batch File Help Windows OS 8 02-23-2007 03:09 AM
How can i replace a in-use file with CMD or batch..?? Windows OS 3 02-20-2007 03:15 PM
batch file help Windows OS 0 08-30-2006 09:11 PM
batch file Software & Utilities in General 10 04-06-2006 07:55 PM
help me create a batch file in XP The Meeting Spot - Chat & Socialize 2 07-07-2004 05:13 PM


All times are GMT -4. The time now is 10:14 AM.