Hello, i was just wondering.. how can i make a batch file that makes a file in every folder in desktop when its been run? Thanks,
Oliver.
First, you have to open up notepad, and save it as Example.bat (name it whatever)
IN A FOLDER ON YOUR DESKTOP. Then type:@Echo off
cls
cd..
cd [NAME OF THE FIRST FOLDER]
[FILE TYPE]>[FILE NAME]
cd..
cd [NAME OF THE SECOND FOLDER]
[FILE TYPE]>[FILE NAME]etc...
file type = .bat , .doc , .txt etc...
hope this helps
Thanks! I really appreciate it. But could i make it search for folders within those folders?
For example, i wanted the C drive checked.
So it will have a folder called
'Users'
How can i make it enter that folder without me writing 'users' in.
Bump. . . . .
All the folders (and shortcuts) seen on the desktop are stored in various folders all named Desktop and with typical paths being C:\Documents and Settings\Administrator\Desktop C:\Documents and Settings\All Users\Desktop C:\Documents and Settings\User Name\Desktop etcdepending on how your system is set up.The content of each Desktop folder can be listed using the Dir command and a file added to each one using a For loop.
Your posts are somewhat confusing, first you want a file added to Desktop folders then you want something done with C: drive. Please be more specific about
what you're trying to achieve.The above is good for Windows XP, Win 7 may differ in the details.
Please come back & tell us if your problem is resolved.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |