1.

Solve : put my movies dates productions in ( )?

Answer»

Quote

Backtracking a little bit - what do you mean by the above?
i mean well look at example and it tells you everything
we have a folder named
American Beauty (1999) and inside it we have a file named American Beauty (1999).mkv
Quote
American Beauty (1999)\American Beauty (1999).mkv
so names of folders and files inside them are similar
and a question=do you have office 2007 or 2003 installed on your system?
in this case before uploading each script you can test it right?
just test it in a folder with a pattern like Mine(3 folders and 4 files next to each other folders are containing files with similar names of their own)
well I'm not sure if error in our script occurs because of similarity of folder's name and files inside them or what i just mentioned that for you to be aware of it
or maybe names hasn't got anything to do with error in script
don't know
Quote from: mioo_sara on February 15, 2014, 09:09:31 PM
we have a folder named
American Beauty (1999) and inside it we have a file named American Beauty (1999).mkvso names of folders and files inside them are similar

Your filenames and foldernames aren't the same in the examples you've shown so far.

Quote from:
and a question=do you have office 2007 or 2003 installed on your system?
in this case before uploading each script you can test it right?

In fact I do test it by making the CSV file. I've created files using names you provided.
I didn't include folders in the test to start with because folders were added afterward.

Quote from:
or maybe names hasn't got anything to do with error in script
don't know

The names match the filespec given, and I don't know what filespecs you have used,
but some names don't match the regular expression because the name must be different from what has been described.


In an earlier post you showed some folders and filenames and this .CSV file was the result.
It seems that the script was changed in some way because the path should not be included in line 2.

Lines 4/5 and 7/8 show that you have duplicate files and folders which are not the same.

Code: [Select]NUMBER,MOVIE NAME,PRODUCTION YEAR
1,"a chirismas carol 4downloads",2009
2,"a chirismas carol 4downloads\A Christmas Carol",2009
3,"Despicable.Me.2...YIFY.720p_p30download .com",2013
4,"KNOWING .BluRay.720p.x26",2009
5,"Knowing..BluRay.720p.x264",2009
6,"Prisoners Cam",2013
7,"Strangers on a Train BluRay 720p",1951
8,"Strangers on a Train BluRay",1951
9,"The Frozen Ground BluRay 720p",2013
10,"The Untouchables BluRay 720p",1987
Quote
The names match the filespec given, and I don't know what filespecs you have used,

well i mentioned it before(in last few post)
i test it in a folder called test folder
you can make it( a test folder ) and test it inside it we have 3 folders and 4 files (inside test folder)
we want to make a report list out of this (test folder) and send it to excel put every unit(number of row-file or folder names-production years in a column)
here you can see what we have inside test folder
folders has been shown in red color

we don't want program to check inside of every folder (just names of files and folders in root of test folder-we don't want any sub-folders or)..just make a report out of the main folder(test folder) and send it to excel and sort it (the way that i mentioned above)

inside test folder (folders has been reded)
just make a report list out of this example and send it excel
Quote
a Christmas carol (2009) 4downloads
Knowing (2009).BluRay.720p.x26
Strangers on a Train (1951) BluRay
Despicable.Me.2.(2013)..YIFY.720p_p30dow.com.mp4
Prisoners (2013) Cam.mkv
The Frozen Ground (2013) BluRay 720p.mkv
The Untouchables (1987) BluRay 720p.mkv

so we should see this list inside excel Quote
In an earlier post you showed some folders and filenames and this .CSV file was the result.
It seems that the script was changed in some way because the path should not be included in line 2.

Lines 4/5 and 7/8 show that you have duplicate files and folders which are not the same.

Code: [Select]

Quote
NUMBER,MOVIE NAME,PRODUCTION YEAR
1,"a chirismas carol 4downloads",2009
2,"a chirismas carol 4downloads\A Christmas Carol",2009
3,"Despicable.Me.2...YIFY.720p_p30download .com",2013
4,"Knowing .BluRay.720p.x26",2009
5,"Knowing..BluRay.720p.x264",2009
6,"Prisoners Cam",2013
7,"Strangers on a Train BluRay 720p",1951
8,"Strangers on a Train BluRay",1951
9,"The Frozen Ground BluRay 720p",2013
10,"The Untouchables BluRay 720p",1987

i all ways first try your script with the exact code that you gave me each time dear foxidrive
but if there was error i remove some PARTS to find the reason error has occurred
names of files( in duplicate rows) that has been changed , occurred when i removed /s i suppose
=======================
but i think if you read my last post above problem can be solved easily
i edited again
1- just make a report from current directory and send it to excel(no sub-folders needed to be checked)
2-you can see my files and folders in test folder above please test it
Quote from: mioo_sara on February 15, 2014, 10:04:17 PM
Quote
The names match the filespec given, and I don't know what filespecs you have used,
well i mentioned it before(in last few post)

As it happens, you didn't mention it anywhere. I asked you if you used *.* and you said no, but you didn't tell me what you did add, or if you changed the filespec.

It turns out that you gave me results from a script that you changed. If you want to FRUSTRATE someone then that's a good way of doing it.


This code doesn't recurse through any subdirectories.

Code: [Select]@echo off
set "filespec=*.mkv *.avi *.mpg *.mp4 *.mpeg"
dir %filespec% /b /a-d |findstr "([2][0][01][0-9])" >temp.txt
dir %filespec% /b /a-d |findstr "([1][9][0-9][0-9])" >>temp.txt
type temp.txt |repl "(.*)\(([0-9][0-9][0-9][0-9])\)(.*)\..*" "\q$1$3\q,$2" x >temp2.txt
dir /b /ad |findstr "([2][0][01][0-9])" >temp.txt
dir /b /ad |findstr "([1][9][0-9][0-9])" >>temp.txt
type temp.txt |repl "(.*)\(([0-9][0-9][0-9][0-9])\)(.*)" "\q$1$3\q,$2" x >>temp2.txt

type temp2.txt | sort |findstr /n "^" |repl ":" "," |repl " \q" "\q" x >temp3.txt


>file.csv echo NUMBER,MOVIE NAME,PRODUCTION YEAR
type temp3.txt >>file.csv
del temp.txt temp2.txt temp3.txtQuote
If you want to frustrate someone then that's a good way of doing it.
me? i never tried to frustrate you or you're works dear foxidrive! in all posts you can see that i first tried your original script and then my edited one and in all posts i just displayed result of your script not mine !

here is result of new script
sorry dear foxidrive in this last post i made a mistake i will test it in a few minutes
worked dear foxidrive
its working like a charm thank you very very much



you can see the result
NUMBER MOVIE NAME PRODUCTION YEAR
1 a chirismas carol 4downloads 2009
2 Despicable.Me.2...YIFY.720p_p3.com2013
3 Knowing .BluRay.720p.x26 2009
4 Prisoners Cam 2013
5 Strangers on a Train BluRay 1951
6 The Frozen Ground BluRay 720p 2013
7 The Untouchables BluRay 720p 1987

==================
but of course extensions have been removed from the list but i don't care
if you want extensions then change this:

Code: [Select](.*)\..*"

To this by removing the 4 characters before the quote in line 5 of the script:

Code: [Select](.*)"
thanks dear foxidrive extensions are displayed very nice now
thank you you are a professional programer
i hope you be Healthy in your entire life
thanks again


Discussion

No Comment Found