|
I like to create a batch file (winxp cmd) that recursively goes through a chose folder and sub folders and renames there files+folders with the following rules:
from all file + folder names, all uppercase+lowercase "V" and "W" letters need to be replaced...
Started by Tom on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Directories are a bit trickier (at least, * c:\temp\* , removing this line would change the name to * c:\teAp\* in the end..
The following batch does this for the file names at least.
|
|
I have hundreds of text files in a folder named using this kind of naming convention:
Bandname1 - song1.txt Bandname1 - song2.txt Bandname2 - song1.txt Bandname2 - song2.txt Bandname2 - song3.txt Bandname3 - song1.txt ..etc.
I would like to create folders...
Started by jrara on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Import os import os.path sourceDir = "data" targetDir = "target" def myVisitor(arg, dirname, names): for file in names: bandDir....
That you can customize to organize your music however you want:
This rule says, "assume my file names.
|
|
I want to get all file names from a folder using Ruby.
Started by Željko Filipin on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Dir.entries(folder)
example:
Dir.entries(".")
Source: http://ruby-doc.org/core/classes/Dir.html files in any folder or sub-folder:
Dir["/path/to/search/**/*.rb"].
|
Ask your Facebook Friends
|
HI, I need to create unique folder name to be created in the user local App data path, I cannot generate folder names using MD5 and other algorithms as the result has in valid characters for folder name. Is there a way from which I can generate folder...
Started by Siddharth on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Saying this because you could use the system time, in milliseconds, to name those unique folders.
|
|
I just want to know how can I get all the names of the folders in a current directory. For example in my current directory I have three folders:
stackoverflow reddit codinghorror
Then when I execute my batch script all the three folders will print in ...
Started by sasayins on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
| ? { $_.PSIsContainer }
Old Answer:
With PowerShell:
gci | ? {$_.Length -eq $null } | % { $_.Name }
You can use.
|
|
Scripting question. Dang, it should be easier than this. I have a file with a list of names. I'd like to turn those names into folders. Whenever I try the FOR loop, all I get is the name of the file I want to read from being created as a folder, not the...
Started by Brian68178 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
Replace ^p with ^pmkdir.
One way is to open the list of names in word and do copy and replace.
|
|
I am using rename() to move a file from one folder to another with php.
It works fine with folders which don't have the swedish å ä ö characters involved.
Is there any way around this? (except for changing the folder names to something without special...
Started by Camran on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This SO.
Anyway, if the filesystem supports it, it should be possible to use UTF-8 in file names.
Or as pointed out be used.
You can use the regular expression to clean file/folder names though.
Or not.
|
|
The criteria is basically this:
folders will exist for about 24-48hrs folders names can not be readily guessable by a user (if used in a URL) folder names should be short 5-15 chars Initial thoughts:
printf('%u',crc32(microtime(true)));
Details: When ...
Started by farinspace on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
The classic technique looks something like
+ uploader-name and tmpnum, both at cstdio (....
Use the date and time in order to generate the name
I'd use something like it a username or random number etc).
There are other approaches too.
|
|
Hello! I want to be able to pass in the path of a folder to an application and have the program run through the entire contents of that folder, including nested folders and files, deleting any folder that it comes across which has a specific name.
I have...
Started by Goober on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
A folder name as its argument and have it call Directory.GetDirectories(), iterate through the string that matches the name you specify:
public void RecursiveDelete(string path, string name) { foreach (string directory in ....
|
|
How do I prevent the name of the Solution Folder in a VS project from being appended to the namespace generated for new items added to the solution folder?
Example: C# project in a VS solution Default Namespace set in C# project properties: "BigClient...
Started by sbohlen on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I've found one workaround which is to name it like \Folder1\Folder2\Folder1.Folder2.ProjectName\Folder1.Folder....
I create a project name.
The nested folder names to be appended to my namespace, but Visual Studio won't do it.
|