Hi,
I am trying to write a batch file which does the following:
1. Move all the files created on weekdays to be sorted to their respective days folder Example: Files created on Tuesday should be moved to a folder named "Tuesday"(When the batch file is run on Wednesday).
2. Only that particular day's created files should be present in the main directory and the other files should be moved to their respective days(created days) folder!!!!!
Could you please help me out!!!!!
Thanks.
AUse xp_cmdshall with regular dos dir, copy, etc. You can save list of files in folder to temporary or permanent table like this:
create table #tmp(res varchar(700))
insert #tmp
master..xp_cmdshell 'dir myfolder'
Showing posts with label batch. Show all posts
Showing posts with label batch. Show all posts
Wednesday, March 28, 2012
Friday, March 9, 2012
problem when deleting record in table
I tried to delete all record in Table X
but sometimes it takes very long time and sometimes just like hang, the
status is
"Executing Query Batch"
why could this happen?HI,
Use
TRUNCATE TABLE <table name>
to delete all records in a table.
Thanks
Hari
SQL Server MVP
"chin_yen83" <chin_yen83@.yahoo.com> wrote in message
news:1124938782.400433.251690@.o13g2000cwo.googlegroups.com...
>I tried to delete all record in Table X
> but sometimes it takes very long time and sometimes just like hang, the
> status is
> "Executing Query Batch"
> why could this happen?
>
but sometimes it takes very long time and sometimes just like hang, the
status is
"Executing Query Batch"
why could this happen?HI,
Use
TRUNCATE TABLE <table name>
to delete all records in a table.
Thanks
Hari
SQL Server MVP
"chin_yen83" <chin_yen83@.yahoo.com> wrote in message
news:1124938782.400433.251690@.o13g2000cwo.googlegroups.com...
>I tried to delete all record in Table X
> but sometimes it takes very long time and sometimes just like hang, the
> status is
> "Executing Query Batch"
> why could this happen?
>
Subscribe to:
Posts (Atom)