Select file with operator sign in name

Hi,
I Have a little problem with my powershell and it's driving me crazy. The goal of the script is to move file base on a filter.
The name file : 4456#FIDI#FIDI-+-ASSURANCE#20140407#093415#71545176#5266875.wav
The filter : #FIDI#FIDI-+-ASSURANCE#
Here is my code :
$directory_origine8 = "R:\RECORDS_ALL\OLD_RECORDS\other records\ALL_FIDI"
$directory_destination8 = "R:\RECORDS_ALL\FIDI\Assurance"
$filter8 = "#FIDI#FIDI"-+-"ASSURANCE#"
$filter8
foreach ($file8 in (Get-ChildItem -Path $directory_origine8 -Recurse | Where-Object { $_.Name -match $filter8} ))
$filter8
$fichier = $file8.Name
$fichier
$path_fichier = $file8.fullname
$path_fichier
At the end of the execution I get "#FIDI#FIDI"-+-"ASSURANCE#" which is line 4. I have plenty of files matching the filter.
Can you help me ?
best regards
GenePatton

GenePatton
Just execute only these two lines
$filter8 = "#FIDI#FIDI"-+-"ASSURANCE#"
$filter8
You will get an error
Or you trying to filter file contains FIDI and ASSURANCE
$directory_origine8 = "R:\RECORDS_ALL\OLD_RECORDS\other records\ALL_FIDI"
$directory_destination8 = "R:\RECORDS_ALL\FIDI\Assurance"
#$filter8 = "#FIDI#FIDI"-+-"ASSURANCE#"
#$filter8
foreach ($file8 in (Get-ChildItem -Path $directory_origine8 -Recurse | Where-Object { $_.Name -contains "*#FIDI#*" -and $_.Name -contains "*ASSURANCE#*"} ))
$filter8
$fichier = $file8.Name
$fichier
$path_fichier = $file8.fullname
$path_fichier
or this
$filter8 = "#FIDI#FIDI-+-ASSURANCE#"
$filter8
$directory_origine8 = "R:\RECORDS_ALL\OLD_RECORDS\other records\ALL_FIDI"
$directory_destination8 = "R:\RECORDS_ALL\FIDI\Assurance"
$filter8 = "#FIDI#FIDI-+-ASSURANCE#"
$filter8
foreach ($file8 in (Get-ChildItem -Path $directory_origine8 -Recurse | Where-Object { $_.Name -match $filter8} ))
$filter8
$fichier = $file8.Name
$fichier
$path_fichier = $file8.fullname
$path_fichier
Regards Chen V [MCTS SharePoint 2010]

Similar Messages

  • Importing CD to Artist folder\Album folder\file with track number and name:

    I have a problem then importing my cd’s to my harddisk using iTunes.
    On my previous pc I got what I want, Artist folder, Album folder and file with track number and name:
    e.g.
    D:\My Music\B.B. King\Blues On The Bayou\01 Blues Boys Tune.mp3
    D:\My Music\B.B. King\Blues On The Bayou\02 Bad Case Of Love.mp3
    D:\My Music\B.B. King\Blues On The Bayou\03 I'll Survive.mp3
    But now I get:
    D:\My Music\Compilations\Blues On The Bayou\01 Blues Boys Tune.mp3
    D:\My Music\ Compilations \02 Bad Case Of Love.mp3
    D:\My Music\ Compilations \03 I'll Survive.mp3
    In iTunes my settings are Edit -> Preferences -> Advanced: iTunes Music folder: D:\My Music and checkmark in both: “Keep iTunes Music folder organized” and “Copy files to iTunes Music folder when adding to library”.
    My version of iTunes is 8.0.1.11
    Thanks in advance
    Peter

    It will depend on the album. Gracenote considers anthologies, a collection of tracks by the same artist taken from different albums, as a compilation. In iTunes the compliation setting should really only be applied to a collection of tracks by different artists.
    tt2

  • Adobe PDF iFilter 9 for 64-bit platforms does not index my PDF files with Digital Sign

    Adobe PDF iFilter 9 for 64-bit platforms does not index my PDF files with Digital Sign, why?

    hi  Phillip
    i am not sure what you mean
    I downloaded the ifilter and installed it
    then configured everything as shown in the pdf file
    I tried indexing from scratch exactly as i did successfully in the other computer
    and got some errors in the log file
    i checked the sql server log and the event viewer logs and got :
    Error '0x80004005' occurred during full-text index population for table or indexed view '[Pirsumim_ext_ck].[dbo].[T_PUBLICATIONS]' (table or indexed view ID '2073058421', database ID '14'), full-text key value 0x0000027A. Attempt will be made to reindex it.    
    The component 'PDFFilter.dll' reported error while indexing. Component path 'C:\Program Files\Adobe\Adobe PDF iFilter 9 for 64-bit platforms\bin\PDFFilter.dll'.   
    Informational: Full-text retry pass of Full population completed for table or indexed view '[Pirsumim_ext_ck].[dbo].[T_PUBLICATIONS]' (table or indexed view ID '2073058421', database ID '14'). Number of retry documents processed: 1. Number of documents failed: 1.
    Changing the status to MERGE for full-text catalog "Pirsumim_ext_catalog_ck" (5) in database "Pirsumim_ext_ck" (14). This is an informational message only. No user action is required.
    Informational: Full-text Auto population initialized for table or indexed view '[Pirsumim_ext_ck].[dbo].[T_PUBLICATIONS]' (table or indexed view ID '2073058421', database ID '14'). Population sub-tasks: 1
    the same dll worked fine in another computer...
    how can i see more details what is wrong with this dll  ?
    meidad

  • Zip.ZipInputStream cannot extract files with Chinese chars in name

    Dear friends,
    Peace b upon u!
    I am trying to read a zip file (~3000 files)containing one
    or more files with Chinese, Japanese or Korean names, the
    getNextEntry method throws an IllegalArgumentException as below after extracting just ~300 files as below:-
    java.lang.IllegalArgumentException
            at java.util.zip.ZipInputStream.getUTF8String(Unknown Source)
            at java.util.zip.ZipInputStream.readLOC(Unknown Source)
            at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
            at testZipFiles.getZipFiles(testZipFiles.java:65)
            at testZipFiles.main(testZipFiles.java:18) issue:java.util.zip.ZipInputStream cannot extract files with Chinese chars in name
    Category java:classes_util_jarzip
    Plz let me know 1 of the ways which I can solve this issue.
    1)if someone has JAVA DCOMPILER plz send the SOURCE Code
    for the ZipInputStream.class to me..I need to edit it using 1 of the solutions as provided below which I googled.
    2)If there is an alternate or upgraded java.util.zip.ZipInputStream or any org.apache.tools.zip.* package which can read such files..If yes where I can download the same on net.
    3)Any other easier solution, which can let me extract all files (by excluding Chinese files thru CATCH) without the extractor process to fail altogether.
    On net I found that the only solution with this is:-
    - edit the new ZipEntry, remove the static initializer that calls
    the native methods initIDs().
    this step seems a bit scary, but it's according to the
    workaround
    to bug #4244499 (the workaround of Olive64, THU JUN 05
    01:55 P.M. 2003),
    that handles a similar bug at the ZipOutputStream.
    Now you have a ZipInputStream that supports multi-bytes
    entry names.
    to extract the zip file, using the fixed code that is offered
    above,
    create a function that gets an "encoding" string, a "destPath"
    string
    and a "sourceFile" (zipped) and does :
    ZipInputStream zipinputstream = null;
    ZipEntry zipentry;
    zipinputstream = new ZipInputStream(new FileInputStream
    (sourceFile),encoding);
    zipentry = zipinputstream.getNextEntry();
    while (zipentry != null) { //for each entry to be extracted
        String entryName = zipentry.getName();
        int n;
        FileOutputStream fileoutputstream = new FileOutputStream
    ( destPath + entryName );
        while ((n = zipinputstream.read(buf, 0, 1024)) > -1)
            fileoutputstream.write(buf, 0, n);
        fileoutputstream.close();
        zipinputstream.closeEntry();
        zipentry = zipinputstream.getNextEntry();
    }//while
    zipinputstream.close();

    Hi friend,
    We'd better to ask one question in each thread. If you have another issue, you can consider to open up a new thread in this forum.
    Now for the first question, do you mean this picture? It throws access exception in archive2.
    If so , because your extractPath is a path, not a directory.You should add +"xxx.zip". For more information, please refer to
    ZipFile.Open
    Method (String, ZipArchiveMode).
    For the second question, you can use the following code to skip the error message.
    while (true)
    try
    //do something;
    catch (Exception ex)
    { continue; }
    Good day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How move file with space in the name to another foler on Linux from ABAP?

    Hi experts,
    My requirement is to move the file on Linux to another folder via ABAP program.
    IN SM49 is defined ZMOVE command for "mv" operating system command. In ABAP, fm:
    SXPG_COMMAND_EXECUTE calls ZMOVE external command to move the file to another folder.
    But in case that file has space in the file name, then the fm gives error and the file can not be moved.
    I have tried as given in the Note 1152084 - Parameter for external commands but it doesn't work.
    Don't know if the reason is that the note is for Windows or Unix and we have Linux.
    So, I have tried with ''%file name%' and '''file name'''.
    PLease advice hoe to move file on Linux to another folder from ABAP program if the file has spec in the name.
    Thanks in advance.
    Kind regards,
    Danijela Zivanovic

    Hi,
    You can also try :
    mv "file\ name" /<path_to_new_dir>
    (Put "\" before each space)
    Regards.
    Rajesh Narkhede

  • How to send multiple files with it's original name over HTTPS using one CC?

    I am working on a File to HTTPs scenario. It is in production and working fine. Currently we send only one file and I have hard coded the name in the communication channel in the header fields. Now we have to send more files with different names and I want to use only one receiver channel instead of many. We need to send the files with their original names.
    I used the ASMA in the sender File Adapter and I see the FileName in the dynamic configuration under http://sap.com/xi/XI/System/File name="FileName".
    I know we can use a UDF in message mapping and get the value and put it in HEADERFIELDONE. But we don't want to use mapping as the files are huge and we don't want to insert XML tags in the payload.
    So how do I put the Filename from the DynamicConfiguration to the HTTP header field as FileName without using mapping? Are there any settings?
    Can I put something in the PROLOG or can I use any other module in the File Sender Adapter or is there any other option?
    Any help is appreciated.
    Thanks
    Sai

    See my blog:
    /people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping
    You have to put the configuration in sender channel, as HTTP adapter does not allow modules.
    For the second module, put values related to HTTP adapter.

  • LibreOffice can't open files with spaces in the name

    Hi, so I recently installed LibreOffice (from extra) over go-OO. I know the site says it's not for production use but I have heard good things about the stability of the current version so I decided to see if it was in a usable state. In general things are going great, but I do have the problem mentioned in the thread title. The program has trouble parsing the spaces, and instead I am trying to open each space-delimited section of the filename as a separate file. Trying to open "My File.odt", for example, will simply return two error messages, one about "path/to/current/directory/My" not existing, and another about "path/to/current/directory/File.odt" not existing. I can't seem to get around this behaviour and, surprisingly, I can't find anything on it by Googling.
    I know that LO is in beta and this may just be a bug that is being worked on, but since I can only find one reference to it on the net I thought that maybe others were not having this problem or had found a way around it.  Can anyone provide any insight? Cheers!

    vimex wrote:
    comment these lines in /usr/lib/ooo-3.3/program/soffice
    the $* has some problem, but I do not know how to correct this...
    # Setup our app as oosplash, but try to avoid executing pagein,
    # and other expensive environment setup pieces wherever possible
    # for a second started office
    #if [ "$sd_binary" = "soffice.bin" -a -x "$sd_prog/oosplash.bin" ] && [ "$no_oosplash" != "y" ] ; then
    #    sd_binary="oosplash.bin"
    #    export QSTART_CHECK_ONLY=1
    #    if "$sd_prog/$sd_binary" $*; then
    #   exit 0
    #    fi
    #    unset QSTART_CHECK_ONLY
    #fi
    I noticed that commenting out that code allows LibreOffice to open spaced filenames, but seems to slightly increase startup time.
    I tried replacing $* with "$*", and opening from the command line seems to work even for files with spaced names, with the faster startup time too. The only problem is that now LO does not work at all by clicking; only from command line.

  • Mplayer can't play files with spaces in their name

    After scratching my head and reinstalling codecs several times without luck, and old memory resurfaced of this occuring before and I managed to solve the problem.
    The thing is that if you doubleclick a file in Nautilus, and said files has spaces in its name, mplayer won't be able to play it, and gives a very cryptic error message, ie "cannot play file a%20b.avi" if the name of the file is "a b.avi".
    The trick is mentioned in this thread -- you edit /usr/share/applications/mplayer.desktop and change 'Exec=gmplayer %U' to 'Exec=gmplayer %F'.
    The bug has been around forever, and hasn't been fixed yet. Perhaps the mplayer devs don't want to fix it. In any case, I would propose that either we fix this in the mplayer Arch package, or that someone more knowledgeable than I get in touch with the devs about it.
    Just a suggestion, but I think it's kind of important. It's really confusing to new users.

    In my opinion, it it's not arch's job to fix bugs from upstream, no matter if it's mplayer or gnome's fault. Of course there are exceptions, eg if a bug in a critical package hardlocks the whole system, or adds a huge security risk.
    I would like to belive that the general arch user is smart enough to find one of the 30 threads about this bug (or the entry on the bugtracker) and fix it themselves. Personaly I would put this in the same category as packages that don't have a .desktop file at all from upstream.
    Oh, and as a small sidenote: http://phraktured.net/patching-patching-patching.html

  • Deleting file with special character in name gets error -43

    In my Trash folder there is a .html file with a name containing special characters (oriental) left over from when I uninstalled Adobe CS2. When I try to change the file name to delete the special characters so I can trash the file, I get error -43, and the name won't change. Therefore I can't get the file deleted from the computer because I can't get rid of the special characters.
    Is there another way to accomplish the same thing?

    I presume you are referring to the notorious Vietnamese file. Others have had success getting rid of it wuth these instructions .
     

  • Smart Collection: How to select files with unassigned/unknown/null metadata?

    Is there an easy way to set up a Smart Collection to show all files with unassigned/null data in a specific metadata field?
    Example: Smart Collection to show all files where IPTC "City" is unassigned (null/ blank)
    I currently have a mickey mouse way of doing it that works, by selecting files NOT containing a,b,c,d,e,f,..... in the chosen metadata field, but can't beleve a more elegant (built-in) solution doesn't exist for unassigned/null values
    thks!

    "I will release a new plugin, Any Filter, in a day or two, that, among many other things, will allow you to search for fields with no values."
    that sounds great, thanks, John!
    i know nothing about the LR internal code, but would imagine that having to check each field's text string against 36 separate conditions (a-z, 0-9) as i'm currently having to do is not nearly as efficient performance wise as just testing against a single null flag or indicator - especially in large catalogs (i have about 120,000 files in mine) 

  • Having problems creating a zip file with Japanese language character names

    I have a bunch of files with names in Japanese characters (also Chinese, Korean, Spanish etc, but this will do for an example). The encoding is Unicode.
    I wish to be able to put them in a zip file, then extract them again using any old zip tool (WinZip,PKZip,7-Zip etc)
    Trouble is, every time I do it, the files inside the zipfile end up with garbage character names. The contents of the files are fine, though.
    I'm aware that there used to be a bug in the java.util.zip.* classes regarding character encodings (http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=5bd4fe01ad8a7b4ec89afef5005da?bug_id=4244499) but as far as I can see it's supposed to have been fixed I have also tried the ZipOutputStream class from apache which allows you to set the encoding manually - no luck there either (just many different varieties of garbage characters)
    Test code below. What am I missing here?
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.IOException;
    public class ZipTest {
    static String uniqueFileName = "&#35199;&#12288;&#32020;.txt";
    public static void main(String[] args) {
    try {
    standardZip();
    apacheZip();
    } catch (IOException fe) {
    System.out.println("problem in file - exception " + fe.getMessage());
    public static void apacheZip() throws IOException {
    String encoding = "";
    File inputFile = new File(uniqueFileName);
    FileReader reader = new FileReader(inputFile);
    encoding = reader.getEncoding();
    System.out.println("Using Apache - Encoding = " + encoding);
    File zipFile = new File("apacheZip.zip");
    org.apache.tools.zip.ZipOutputStream zipOutputStream = new org.apache.tools.zip.ZipOutputStream(
    zipFile);
    zipOutputStream.setEncoding(encoding);
    org.apache.tools.zip.ZipEntry zipEntry = new org.apache.tools.zip.ZipEntry(uniqueFileName);
    zipEntry.setSize(inputFile.length());
    zipEntry.setTime(inputFile.lastModified());
    zipOutputStream.putNextEntry(zipEntry);
    int c = 0;
    while (c >= 0) {
    c = reader.read();
    if (c >= 0) {
    zipOutputStream.write(c);
    zipOutputStream.closeEntry();
    zipOutputStream.finish();
    public static void standardZip() throws IOException {
    String encoding = "";
    File inputFile = new File(uniqueFileName);
    FileReader reader = new FileReader(inputFile);
    encoding = reader.getEncoding();
    System.out.println("Using Java IO - Encoding = " + encoding);
    File zipFile = new File("standardZip.zip");
    FileOutputStream zipOut = new FileOutputStream(zipFile);
    java.util.zip.ZipOutputStream zipOutputStream = new java.util.zip.ZipOutputStream(zipOut);
    java.util.zip.ZipEntry zipEntry = new java.util.zip.ZipEntry(uniqueFileName);
    zipEntry.setSize(inputFile.length());
    zipEntry.setTime(inputFile.lastModified());
    zipOutputStream.putNextEntry(zipEntry);
    int c = 0;
    while (c >= 0) {
    c = reader.read();
    if (c >= 0) {
    zipOutputStream.write(c);
    zipOutputStream.closeEntry();
    zipOutputStream.finish();

    Emma_Baillie wrote:
    I have a bunch of files with names in Japanese characters (also Chinese, Korean, Spanish etc, but this will do for an example). The encoding is Unicode.
    I wish to be able to put them in a zip file, then extract them again using any old zip tool (WinZip,PKZip,7-Zip etc)
    Trouble is, every time I do it, the files inside the zipfile end up with garbage character names. The contents of the files are fine, though.This is becuase zip tool doesn't support unicode for zip entries. For example WinZip prior to 11.2 does not support Unicode characters in filenames. You need to look for the simillar information for other tools. You can find more on tools on their website.

  • Printing different/selective files with different copies

    Hi everyone,
    I've been working on finding a solution, on how to print different pdf files with different copies, without opening the pdf-files.
    Task:
    I have a folder, with 25 pdf files
    I want to make a php overview, of the folder
    At the end of each line/file - i would like to add a number for the copies
    In the end, I would like to simply press print - and every document ive added a number/copies to - are being printet...
    I guess I need to use PrintPDF - but does anyone know any pre-made program/function - that could handle the "copies" part...?
    I hope someone can help me out,
    Thanks
    Jan

    Well, i had hoped that the acrobat could open silent - eventhough they've removed that feature in the newer versions.
    Even though the program would open - if the amount of copies was added - and i just hat to press print - it would ease the job alot.

  • How can i see folders and files with a 'Ñ' on his names?

    hi everybody, i'm a newer with MacOS, i've buy a MacBook Pro last Friday on Bogotá - Colombia, last nigth i plugged an external hard disk drive with many folders including a folder called: "Microsoft Office 2011 Español", when i explorer the hard disk i can't see this folder, i rename this folder on my pc on windows 7 and remove the word "Español" after that i was able to see the folder
    i think that it is a configuration of OS, so can anybody help me to fix this problem?

    Halo Mattias,
    i using this function get file file name and directory:
    at selection-screen on value-request for p_file.
      call function 'F4_FILENAME'
        exporting
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        importing
          file_name     = p_file.
    Rgds,
    Wilibrodus

  • How to restore files (with padlock sign) from iBackupbot to iPhone

    Hi there,
    Recently I had updated my iPhone 4 with the latest iOs 6 software. Before the updating begin, iTunes had backup all the informations from my iPhone to iBackupbot in my laptop. After my iPhone had been upgraded with iOS6, I wanted to restore back the informations from iBackupbot into my iPhone. Unfortunately, I can't restore back my files because all of the files has the PADLOCK sign. Please someone out there kindly help me to solve this. Really appreciate it.
    Thank you.

    alrprairie wrote:
    Hello
    I did a Factory Image reset recently on my Windows 8.1 PC.  I did a backup to an external drive of all my personal files before I did the Factory Image reset.
    This backup is listed on the external hard drive as:  "Backup files 2014-07-06" 
    THe properties of this is 322  GB  -   765 files   -  17  folders.
    THis cannot be all my files UNLESS they were compressed. 
    The reason i say this is that also on my extrenal hard drive is "Filehistory"
    THe properties on FileHistory are:  1.45 TB   -  59,580 files  -  765 folders.
    I need to restore these files back to my C: drive
    I am not confident that the Filehistory has all my files, BUT, since the Backup files 2014-07-06 is so much smaller
    than my Filehistory , I do not know what to think.
    I have attempted to restore the files from the Backup files 2014-07-06 but get errors that I do not have security clearance.  I am the only user on this PC.
    I am not very confident that everything is contained on the "FileHistroy" , but I don't really know.
    Does anyone have experience with "Backup files' and "Filehistory" that can help me?
    thank you!
    Hello,
    The backup file must have become inaccessible. I am not sure about the error message but it can because of virus infection in your PC that your files must have got damaged. If you are not able to restore backup file from File History, tehn you may try backup recvery software to recover data from it.  Try this Windows backup recovery sofwtare - http://goo.gl/kYPP6J
    It might help you.
    Thanks.

  • IPhoto splitting events into individual files with long numbers as names?

    Okay so technical first.  I am running Mavericks with iPhoto version 9.5.1 on both my MacBook and iMac.  I have had minor problems/irritations with iphoto for awhile but recently upgraded to Mavericks and the problems increase.  I mainly use iPhoto for organization, I like to do any editing in Photoshop.  My problem is that it is splitting most of my events into individual files, so there's one photo in an event, but there will be several pics from that day.  They are given names that are just numbers, like 20120219-153730.  They have the same date, you an see it below the Title which is the numbers.  I checked preferences, it is set to one event per day.  I have no idea what is going on.  There are still some folders though, so I don't know why it is still affecting some of them.  And the Photostreams for the month are still there.  I tried switching to Picasa but the way the Mac (or is it iPhoto?) organizes the files on the actual computer is a pain too.  They've switched from all the files being in a folder named the date they were taken to a numbered folder within another folder, maybe even in another numbered folder.   And there will be one pic in there even if I took 10 that day.  That is where the number on the Events is coming from.  If anyone could help me I would appreciate it.  It is doing this on both of my computers. 

    Do the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder:
    User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try again.
    NOTE: For Mavericks, 10.9,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.
    Next continue with:
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - Run Option #4, Rebuild Database, followed by Option #1.

Maybe you are looking for