batch file to search and move files ?

Microsoft Windows xp professional with s...
October 6, 2010 at 00:28:18
Specs: Windows XP
i have 2 folders , let it be source and dest . The source folder gets updated periodically with files . I want to write a batch file first to search the source folder for any files and to move the new files in source to destination . Please any one help .........

See More: batch file to search and move files ?

Report •

#1
October 6, 2010 at 00:49:23
"move the new files"

new, as defined by what?


=====================================
Helping others achieve escape felicity

M2


Report •

#2
October 6, 2010 at 02:23:49
the source folder is a shared folder .
I want to copy the files in the source folder to the destination folder . Next , I want to delete the the files copied from the source folder .As soon as a file comes in the source folder I want it to be automatically copied to destination . That means this batch file should be running in the back ground .... I hope you understood the scenarion .. How can I implement this .......

Report •

#3
October 6, 2010 at 04:48:57
Please see the scenario below .

Scenario :
To write a batch file to copy files from source folder to destination folder . Once the batch file is run , as soon as a file is uploaded in the source folder it should be copied to destination folder .


Report •

Related Solutions

#4
October 6, 2010 at 04:59:18
Batch files are not much good for that.


=====================================
Helping others achieve escape felicity

M2


Report •

#5
October 6, 2010 at 05:04:21
is there any option you can suggest dear M2 ......

Report •

#6
October 6, 2010 at 05:49:17
There are helpers here in many languages. Try a new thread something like: script to monitor for incoming files.

HTH


=====================================
Helping others achieve escape felicity

M2


Report •

#7
October 7, 2010 at 08:00:35
You can have a batch file running in the background with;

BAT 2 EXE Compiler.

There is a "invisible" option.

BAT 2 EXE DOWNLOAD LINK: http://www.softpedia.com/dyn-postdo...

I will try on the script, but @ school atm. LOL


MUs,

Happy is one who says I am an Ottoman.


Report •

#8
October 7, 2010 at 20:52:45
Thank you ... Mu .. eagerly waiting for the script .... Thanks a lot ...
Regards
Renjith Madhavan

Report •

#9
October 9, 2010 at 10:43:28
Sorry for my late response :/

Compile this batch file (if it works) with BAT 2 EXE Compiler, (link above) with the 'invisible option' so it does run in background. (kill it in processes if needed.)

Run the batch file in the source folder.

REM SCRIPT START---

@echo off

REM Set the destination directory here below.
set DESTINATION=D:\MOVED_FILES

REM Moving files here. (in a loop)
:MOVEFILES
MOVE /Y *.* %DESTINATION%
goto MOVEFILES

REM SCRIPT END---

The move command is an internal command that is available in the below Microsoft operating systems.

MS-DOS 6.0 and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7

http://www.computerhope.com/movehlp...

Please test it out before compiling.

You can schedule the task too if you like..

Let us know if it works.

Again sorry for the late response.

MUs,

Happy is ONE who says I am an OttoMAN.


Report •

Ask Question