Wednesday, June 6, 2012

How to Read File names from a DIR in PERL

#Reading files from the Directory
my $dir = 'C:\Users\philip\Desktop\sample_files';
 opendir(DIR, $dir) or die $!;
 while (my $file = readdir(DIR)) {
        # Use a regular expression to ignore files beginning with a period
        next if ($file =~ m/^\./);
 print "$file\n";
    }
    closedir(DIR);

Dumping CSV files to SQL tables.

Select Import and Export data, by using this you can export any type of datas to your tables.

If you are using window authentication while accessing the tables then you should open this tool by the corresponding net user.

C:\Users\philip\Desktop>runas /netonly /user:DOMAIN\USERNAME "C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSWizard.exe"
Enter the password for DOMAIN\USERNAME :

Wednesday, February 22, 2012

How to turn off the prompt in FTP

type “prompt” in your ftp shell to toggle the prompting on and off.

ssh user@hostabc.com
cd path/to/your/files
ftp ftp.host.com
cd path/to/your/files
prompt
mget *
bye
exit

How to Maximize Windows Command window

1) Open a command window
2) Type wmic
3) Expand your windows as you like, close it and again open it. It will open as a maximized window!