| 1. |
Solve : create a file inside number of folders.? |
|
Answer» Hello every one Script 1(we run this script and it calls second script)Code: [Select]FILES= ("c:\first", "c:\second", "c:\third"' "c:\four"); for $file(files) { system("C:/Perl/bin/perl C:/script_two.pl $file"); } Quote script_two(it creates a blank file inside folders)Code: [Select]use Fcntl; #The Module use File::Find; if($#ARGV != 0) { print "\nUsage: perl $0 <Root Directory>\n"; } else { $dir = ARGV[0]; #The root directory given by the user find(\&edits, $dir); print "Success\n"; } sub edits() { sysopen (FH, 'local.mk', O_CREAT, 0755); close (FH); }name each folder 1, 2, 3... and so on use this code and replace ^name^ with the name of the file your TRYING to make Code: [Select]echo off set dirnum=0 :loop if dirnum=116 echo done&pause&exit set /a dirnum=%dirnum%+1 echo.>C:\%dirnum%\^name^ goto loop |
|