I am trying to block users from entering square brackets ([]) or other charcters to a filename while uploading a document.
Is there a way to block this in SharePoint Central Administration or is there settings that I can change?
...
When working with htaccess files on Windows, is it possible to save the file as .htaccess ? (Rather than having to rename on LAMP server)
...
There are some folder with more than 100 files on it.
But all files and folders names broken with wrong encoding names (UTF->ANSI).
"C:\...\Госдача-Лечебни корпус\вертолетка\Госдача-Лечебни корпус\Госдача-Лечебни корпус\вертолетка\Госдача-Лечебн...
So I'm working on a program where I store data into multiple .txt files. The naming convention I want to use is file"xx" where the Xs are numbers, so file00, file01, ... all the way up to file20, and I want the variables assigned to them to be fxx (f00, f01, ...).
How would I access these files in Python using a for loop (or anther meth...
A drop-box directory for image files has collected variants by letter-case, for example:
Bonsai.jpg, BONSAI.jpg, Bonsai.JPG, bonsai.jpg
I am making a web app using CodeIgniter to manage these documents on a remote server. This means using
file_exists() or is_file() to verify
a file's presence
HTML img tag to display the file grap...
Hello,
I'm writing a python3 program, that gets the names of files to process from command-line arguments. I'm confused regarding what is the proper way to handle different encodings.
I think I'd rather consider filenames as bytes and not strings, since that avoids the danger of using an incorrect encoding. Indeed, some of my file name...
We want to validate file paths, e.g. foo/bar, which the user can enter. Is it possible to create files with leading or trailing space on OS X or Linux, e.g. foo/ bar /bazz?
...
Hi folks,
My application is in JSP/Struts and running on WebSphere. I don't have access to the server /really/ so I'm trying to do all this from within the app itself (Struts actions & config, JSP, etc).
I have a page that displays links for PDF documents that the user might want to look at. When they click on the link, it is forwarded...
I have a folder with a lot of PNG images that I want to create folders for based on their filenames. I would then want the files to be moved into their respective folders of the same name and renamed to 0000.png.
Example:
- abcd.png
- efghi.png
- jklm.png
- nopqr.png
- stuv.png
- wxyz.png
To:
- abcd/0000.png
- efghi/0000.png
- jklm/...
My program accepts input file names either as command line parameters or in a drag and drop operation or in Explorer by clicking on filenames with an extension that is associated with my program.
The command line and drag and drop work fine, but it is clicking on the filenames in Explorer that causes problems when the filepaths of the ...
I am currently working on this project which requires me to make a function which dinamically decides the directory name and then creates a simple .txt file in that directory.
my code is as follows:
($destinatario is a string)
$diretorio="../messages/".$destinatario;
if (is_dir($diretorio)) {
;
}else{
mkdir($diretorio);
}
...
I have two files with different names. I have a for-loop to see if one file is there; if it is then it will change a file.
My first thought was to make a list of all the files and what its counterpart is. That would not look nice and I can't cover all possibilities in the script. If this is the only way, how would I do it best?
The scr...
I have a directory with the files names as "a b c.jpg", "d e f 0.jpg", "g h i.jpg"
I need a script to have all the files ending with "0.jpg" to become "_0.jpg"
So, in the above example the second file should become "d e f_0.jpg"
...
I'd like to ensure that a given file name is valid, even if it means replacing or removing some characters. I'm currently doing this:
Path.GetInvalidFileNameChars ().ToList ().ForEach (x => path.Replace (x, '-'));
But as far as I can tell, this is not guaranteed to yield a valid filename. Is there any better way than performing above ...
I'd like to change the file name suffix from files (using a bash script), but sometimes there are files with one period and some with two.
Now I use this:
new_file=`echo ${file} | sed 's/\(.*\.log.*\)'${suf}'/\1.'${num}'/'`
Where 'new_file' is the new file name, 'file' the original file name, '${suf}' the file's suffix and ${num} a n...
Windows uses case-insensitive file names, so I can open the same file with any of these:
r"c:\windows\system32\desktop.ini"
r"C:\WINdows\System32\DESKTOP.ini"
r"C:\WiNdOwS\SyStEm32\DeSkToP.iNi"
etc. Given any of these paths, how can I find the true case? I want them all to produce:
r"C:\Windows\System32\desktop.ini"
os.path.normc...
How can I request the user to input the filename that my program needs to read from and have it output the name with ".out" instead?
Example:
char fileName[256];
cout << "What is the file name that should be processed?";
cin >> fileName;
inFile.open(fileName);
outFile.open(fileName);
But I need it to save the file as a filename.out ...
How do I retrieve all filenames matching a pattern in a directory? I tried this but it returns the full path instead of the filename.
Directory.GetFiles (path, "*.txt")
Do I have to manually crop the directory path off of the result? It's easy but maybe there is an even simpler solution :)
...
I am writing an application in C# that will need to find placeholders in URLs and/or file names, and substitute in a value, much like this: C:\files\file{number} => C:\files\file1 Unfortunately for that example, curly braces are allowed in file names and URLs.
Can anyone please suggest some characters that I can use to denote placeholde...
Within a loop in my bash script, I am 'doing work', then writing the result of each iteration to its own file. I'd like to name these files
# User-defined Function (UDF)
processLine(){
line="$@" # get all args
index=$(echo $line | gawk -F::: '{ print $1 }')
content=$(echo $line | gawk -F::: '{ print $2 }')
# Let's tr it to remove do...