Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2004, 06:42 AM
Minime Minime is offline
Member
 
Join Date: Jul 2004
Posts: 44
Default Need HELP right now (i am in a customer) - DOS question ppl.

Hi folks,

I need help right now.

There are some subdirectories in my c:\concentrador\cupom\. I need to move files from these subdirectories into my directory c:\contas\... But i am having trouble because when i use XCOPY the subdirectories come together with these files... I just need the FILES and not the SUBDIRECTORES\the files... I tried MOVE command but it doesnt understand that i need search all subdirectories in c:\concentrador\cupom\ (it just search for files in c:\concentrador\cupom\).

Best regards.
Reply With Quote
  #2  
Old 09-27-2004, 10:56 AM
Rob-Z Rob-Z is offline
Senior Member
 
Join Date: Jul 2003
Posts: 134
Default RE: Need HELP right now (i am in a customer) - DOS question ppl.

The quickest way is to get the list of all the files dumped into a file and iterate through the list with the copy command.

dir /A-D/S/B > MyFileList.TXT

This gets all files that are not directories (A-D) in all levels of directories (/S) in bare format (/B no dates or attributes just names) and redirect the output to a file called MyFileList.TXT

You can edit the MyFileLIst.TXT and replace all C:\ with a "Copy C:\" and save it as a .BAT file so you can execute it. I'm sure there is another method to read from the file as input into a copy command but my DOS is rusty. I would edit the file and save it as a .BAT then run it.

PLEASE ACCEPT IF HELPFUL




Rob
Reply With Quote
  #3  
Old 09-27-2004, 11:17 AM
Minime Minime is offline
Member
 
Join Date: Jul 2004
Posts: 44
Default RE: Need HELP right now (i am in a customer) - DOS question ppl.

Thank you !!!
Thank you !!!
Thank you !!!
Thank you !!!

Best regards!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.