Media Companion

Discussion and development board for the program Media Companion.
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  

Share | 
 

 batch file create for scraping info

View previous topic View next topic Go down 
AuthorMessage
professor_jonny
New User
New User


Posts : 1
Join date : 2013-03-07

PostSubject: batch file create for scraping info   Thu Mar 07, 2013 12:41 pm

Some one may find this usefull but basically what i have done is create duplicate files of same name and extention in a different folder but the files them self are empty:

what i have used this for is to scrap media from my "work" pc without having to carry all my media with me basically I fire up move to the directory of my files then type the following into command prompt:

for %x in (*.*) do type NUL > f:\%x

For people with broadband at home with a big cap this is probally useless but it works well for me as i only have dialup at home but have access to broadband elsewhere.

One note is to ensure you dont omit the path from after the nul > or you will effectivly delete every file in the path be warned !!!!.

i have set up a memory stick with an auto play feature i just pop it in my pc and it runs a batch file to create the empty files on the stick then when i pop it in another pc i just run media companion and point to the drive

the problem i have is i dont know how to search in deeper directorys if i use the /r command i get a error:

for /r %x in (*.*) do type NUL > f:\%x

which effectivly outputs type f:\c:\video name.ext is there a way to strip the drive from the piped output or an alternative method?

i thaught of using the dir /a command to output files to an to an appended file then recall the file

ie:

dir /c /b /s >> names.txt

then run a command and parse the created file throu it but i have to manually open the file in excel using the \ as a collum seperator then strip the folder structure and put the file in parenthesisis and resave it with the stripped folder structure then pasre it again ie:

for /f %i in (names.txt) do type NUL > f:\%i

would any one know how to remove the manual the middle step ?or be able to offer an alternative method with out running the script in every sub folder as that is what i am currently doing, id like to make it automatically pick up new directorys with outhaving to create a new batch file.?

i see there is a token operand in the for command but i dont know how to use it.

im hoping to just run the batch file with out having to edit the folder structure in the outputed names.txt file so i can just use the autoplay function in windows to scrape file names and store them on the usb stick with just popping it in the computer.


Back to top Go down
View user profile
 
batch file create for scraping info
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Media Companion :: Media Companion :: General Discussion-
Jump to: